Discussion Locked

DOS COMMAND

0 helpful
9 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hi,
this might be easy but i dont know it.
how can i access the Program Files directory through the command utility ( DOS COMMAND) As you all know this directory has long name and DOS does not accept long names.
When i try to move to that directory as
"C:\ cd Program Files " i get the following " too many parameters -files"

Actually i am writing a batch file to copy some files from the network to the users PCs. some of these files should be copied to the ProgramFile directory. Thats why i need to know how to move to that directory using the dos command.

your help is appreciated

9 replies

by quintar51

if do a 'dir' at the C drive, you'll see that program files is listed as progra~1. That's how DOS sees it. To access it you'll need to type cd progra~1

that's it :)

by syscokid

Additionally, if you're going to subfolders under Program Files that have long file names, like Microsoft Office, you'll have to truncate them too.

C:\Program Files\Microsoft Office would be C:\progra~1\micros~1

Alternatively, you can use the full path if you put it in quotation marks like this:

C:\>cd "C:\program files\microsoft office"

by hkohl

Also you can type this as:

C:\Windows>cd c:\"program files"

or

C:\Windows>cd c:\"program files\microsoft office"

With Win98 the leading " is required - the ending " is not.

This discussion is closed to new replies.