Thread: Converting from DOS file name to Windows file name

  1. #1
    Registered User
    Join Date
    Feb 2004
    Posts
    8

    Converting from DOS file name to Windows file name

    Hey,

    I need to convert a DOS style file path into Windows style. For example, I have this DOS file name:

    C:\PROGRA~1\FILERE~1\FILERE~1.EXE

    but the real one is:

    C:\Program Files\File Renamer\FileRenamer.exe

    Is there some way to convert from one style to another?

    Thank you very much.

  2. #2
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    GetLongPathName. For the other way around there's GetShortPathName.
    CProgramming FAQ
    Caution: this person may be a carrier of the misinformation virus.

  3. #3
    Registered User
    Join Date
    Feb 2004
    Posts
    8
    Works great! Thank you very much.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Need Help Fixing My C Program. Deals with File I/O
    By Matus in forum C Programming
    Replies: 7
    Last Post: 04-29-2008, 07:51 PM
  2. Inventory records
    By jsbeckton in forum C Programming
    Replies: 23
    Last Post: 06-28-2007, 04:14 AM
  3. Script errors - bool unrecognized and struct issues
    By ulillillia in forum Windows Programming
    Replies: 10
    Last Post: 12-18-2006, 04:44 AM
  4. dual boot Win XP, win 2000
    By Micko in forum Tech Board
    Replies: 6
    Last Post: 05-30-2005, 02:55 PM
  5. archive format
    By Nor in forum A Brief History of Cprogramming.com
    Replies: 0
    Last Post: 08-05-2003, 07:01 PM