Batch File / Dos File Names

This is a discussion on Batch File / Dos File Names within the Tech Board forums, part of the Community Boards category; Is there any way to use the long file names (with spaces) in a batch file. Im doing a program ...

  1. #1
    i dont know Vicious's Avatar
    Join Date
    May 2002
    Posts
    1,200

    Batch File / Dos File Names

    Is there any way to use the long file names (with spaces) in a batch file.

    Im doing a program and it calls some "system()" functions to do some Batch file commands. I need it to use full names though.

    C:\Program Files instead of C:\Progra~1

  2. #2
    Yes, my avatar is stolen anonytmouse's Avatar
    Join Date
    Dec 2002
    Posts
    2,544
    Just wrap the path in double quotes.
    Code:
    "C:\Program Files\Some Company\Some Program.exe"

  3. #3
    i dont know Vicious's Avatar
    Join Date
    May 2002
    Posts
    1,200
    ok thank you, it works, but now I have another problem wich I am taking to the c++ board

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Newbie homework help
    By fossage in forum C Programming
    Replies: 3
    Last Post: 04-30-2009, 04:27 PM
  2. sequential file program
    By needhelpbad in forum C Programming
    Replies: 80
    Last Post: 06-08-2008, 01:04 PM
  3. C++ std routines
    By siavoshkc in forum C++ Programming
    Replies: 33
    Last Post: 07-28-2006, 12:13 AM
  4. Encryption program
    By zeiffelz in forum C Programming
    Replies: 1
    Last Post: 06-15-2005, 03:39 AM
  5. Simple File encryption
    By caroundw5h in forum C Programming
    Replies: 2
    Last Post: 10-13-2004, 10:51 PM

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