Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I specify C:\Program Files without a space in it for programs that can't handle spaces in file paths?

Tags:

windows

A configuration file needs position of another file,

but that file is located in "C:\Program Files",

and the path with space in it is not recognized,

Is there another way to specify the location without space in it?

like image 270
omg Avatar asked May 21 '09 11:05

omg


People also ask

How do you pass a path with spaces in CMD?

Use quotation marks when specifying long filenames or paths with spaces. For example, typing the copy c:\my file name d:\my new file name command at the command prompt results in the following error message: The system cannot find the file specified. The quotation marks must be used.

How do I write Program Files x86 in command prompt?

While in the command prompt type "cd\", then enter. From there type "cd\program" then hit the tab button until you see "c:\program files (x86)", then hit enter.


1 Answers

you should be able to use

  • "c:\Program Files" (note the quotes)
  • c:\PROGRA~1 (the short name notation)

Try c:\> dir /x (in dos shell)

This displays the short names generated for non-8dot3 file names. The format is that of /N with the short name inserted before the long name. If no short name is present, blanks are displayed in its place.

like image 191
Boris Guéry Avatar answered Sep 22 '22 13:09

Boris Guéry