Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Changing to Directories with long names - Win2K  (Read 3653 times)

0 Members and 1 Guest are viewing this topic.

arun

  • Guest
Changing to Directories with long names - Win2K
« on: August 13, 2004, 10:07:55 AM »
Hi,
I need a batch file to change to a directory and execute a specific file from that directory.

The directory name contains spaces eg. all users.

I tried using cd "all users"  or cd all users but it fails.

Any idea how to make it work.

This should be working on windows 2000.

Regards
Arun.

2k dummy

  • Guest
Re: Changing to Directories with long names - Win2
« Reply #1 on: August 13, 2004, 10:56:27 AM »
Try using the complete path to the folder.

2k dummy

  • Guest
Re: Changing to Directories with long names - Win2
« Reply #2 on: August 13, 2004, 11:53:27 AM »
Also use the DOS file name. For example, in windows you would see something like c:\window\all users. In DOS it would be c:\windows\alluse~1.

johnwill

  • Guest
Re: Changing to Directories with long names - Win2
« Reply #3 on: August 13, 2004, 12:04:12 PM »
Using the long file name in quotes is the correct procedure.  I'm not sure why that doesn't work, because I have a bunch of batch files where it works fine.  Of course, if you're actually executing the command:

cd "all users"

... you do realize you have to be logged into the Documents and Settings folder, right?  How about trying:

cd "\Documents and Settings\All Users\"

... and see how it works.  That works on my 2K system.