Converting from DOS file name to Windows file name

This is a discussion on Converting from DOS file name to Windows file name within the Windows Programming forums, part of the Platform Specific Boards category; Hey, I need to convert a DOS style file path into Windows style. For example, I have this DOS file ...

  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, 08:51 PM
  2. Inventory records
    By jsbeckton in forum C Programming
    Replies: 23
    Last Post: 06-28-2007, 05: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, 03:55 PM
  5. archive format
    By Nor in forum A Brief History of Cprogramming.com
    Replies: 0
    Last Post: 08-05-2003, 08:01 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21