+ Reply to Thread
Results 1 to 7 of 7

DOS Equivalent File Nomenclature

  1. #1
    Valued Forum Contributor SDruley's Avatar
    Join Date
    04-27-2009
    Location
    Conover, NC
    MS-Off Ver
    Excel 2010 64 bit
    Posts
    415

    Cool DOS Equivalent File Nomenclature

    Can someone tell me if the second line is the DOS equivalent of the first line?


    HTML Code: 

    HTML Code: 
    Turn Data into Information
    Turn Information into Knowledge
    Turn Knowledge into Direction
    Turn Direction into Leadership
    Turn Leadership into Results
    Stephen Druley

    It's not how quickly you think
    But how deeply you think
    The quality of thinking is measured
    by remoteness to conformance
    Stephen Druley

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,464

    Re: DOS Equivalent File Nomenclature

    In a command window, use "dir /x" without the quotes.

    If you start in Documents and Settings/user name, you'll see MYDOCU~1 for My Documents.

    Go down a level into My Documents to see what the files in the folder are called. Not sure you can guarantee it because it will depend on how many similar file names there are.

    Regards
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Expert Kenneth Hobson's Avatar
    Join Date
    02-05-2007
    Location
    Tecumseh, OK
    MS-Off Ver
    Office 365, Win10Home
    Posts
    2,573

    Re: DOS Equivalent File Nomenclature

    If one exists, you can get the other.

    e.g.
    Please Login or Register  to view this content.

  4. #4
    Valued Forum Contributor SDruley's Avatar
    Join Date
    04-27-2009
    Location
    Conover, NC
    MS-Off Ver
    Excel 2010 64 bit
    Posts
    415

    Re: DOS Equivalent File Nomenclature

    Kenneth,

    WOW!! what a program... and you graciouisly added my personal directory tree.

    I ran the program and the DOS equivalent to "My Documents" is "Docume~1".
    Does this seem right to you? or should it be "MyDocu~1"?

    Steve

    PS I will run a trial tomorrow to validate the program output.
    Thanks so much for your efforts

  5. #5
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: DOS Equivalent File Nomenclature

    or
    Please Login or Register  to view this content.
    and
    Please Login or Register  to view this content.
    Last edited by snb; 11-01-2011 at 04:31 AM.



  6. #6
    Valued Forum Contributor SDruley's Avatar
    Join Date
    04-27-2009
    Location
    Conover, NC
    MS-Off Ver
    Excel 2010 64 bit
    Posts
    415

    Smile Re: DOS Equivalent File Nomenclature

    snb,

    There seems to be no limit to your knowledge of vba... brilliant

    I have copied your code below with some remarks added so that I can understand the purpose and output of the code.

    This piece of work also confirms Mr. Hobson's quality coding effort that any name we give to the documents directory is system-read as "documents". Any other folder name is treated as a proxy name.

    Please Login or Register  to view this content.

  7. #7
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: DOS Equivalent File Nomenclature

    From another library you can use the default documentdirectory ( in your case :"C:\users\steve\Documents\") using:

    CreateObject("wscript.shell").specialfolders(13)

    Please Login or Register  to view this content.
    Last edited by snb; 11-01-2011 at 07:18 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1