xcopy32 problem with spaces in file name
On Thu, 22 Jul 2004 13:04:42 -0700, "Peter Poulimenakos"
put finger to keyboard and composed:
I am receiving the following error when I try to use the
xcopy32 command to copy files to a network drive:
'The system cannot find the file specified.'
Now the files it's having a problem with all have a space
before the filename. ex: " Combined Invoice_NAFTA
Cert.dbf" when I view them in explorer. But when Xcopy32
tries to copy the above mentioned file it shows the file
its trying to copy as "_Combined Invoice_NAFTA
Cert.dbf"... And hence can't find the file.
Is there a way to correct this behavior?
The first character in the filename is not a space. To see what it
really is, drop into a DOS window and execute the following:
dir *.dbf /b dirlist
debug DIRLIST
-d 100
-d
...
-q
or
dir *.dbf /b dirlist
edit /64 dirlist
Move the cursor over the hidden character and check its decimal ASCII
"value" at the bottom of the screen.
How are you invoking the Xcopy/Xcopy32 command, ie what is the exact
syntax? FYI, in a Win DOS box, the Xcopy command automatically invokes
Xcopy32.
FWIW, I have no trouble creating a filename with a leading space and
then using Xcopy (or Xcopy32) to make a copy of it. The following
commands work as expected in a Windows DOS box.
rem " junk1" ------ creates a zero byte file
xcopy " junk1" " junk2"
- Franc Zabkar
--
Please remove one 's' from my address when replying by email.
|