Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Batch files and long file names

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Have a quick question for y'all. I'm seeting up a batch file that copies a users My Documents folder to a netowrk share.in win 9x I just used the ~1 for folder names longer then 8 characters. In 2K SP2 I tried the same thing and I get invalid path. for example I would like to do this:

xcopy c:\documents and settings\user\mydocuments to f:\user\mydocuments /e

Anyone know the proper syntax to get this done? By the way the network share is on an NT server 4.0 SP5

Any helps/tips/suggestions would be appreciated.

Alex
 
Try this:

xcopy "c:\documents and settings\user\mydocuments\*.*" f:\user\mydocuments /e

Just put any path with spaces in it in quotes :)

Segfault
 
...make sure you leave a space in "My Documents" though, which would make you put the second path in quotes as well. Heath
Principal Systems Engineer
Desktop and Mobile Platforms
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top