View Single Post
  #4  
Old July 26th 04, 03:16 PM
Peter Poulimenakos
external usenet poster
 
Posts: n/a
Default xcopy32 problem with spaces in file name


-----Original Message-----
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=20

the=20
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=20

space=20
before the filename. ex: " Combined Invoice_NAFTA=20
Cert.dbf" when I view them in explorer. But when=20

Xcopy32=20
tries to copy the above mentioned file it shows the=20

file=20
its trying to copy as "_Combined Invoice_NAFTA=20
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=20

see what it
really is, drop into a DOS window and execute the=20

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=20

decimal ASCII
"value" at the bottom of the screen.

How are you invoking the Xcopy/Xcopy32 command, ie what=20

is the exact
syntax? FYI, in a Win DOS box, the Xcopy command=20

automatically invokes
Xcopy32.

FWIW, I have no trouble creating a filename with a=20

leading space and
then using Xcopy (or Xcopy32) to make a copy of it. The=20

following
commands work as expected in a Windows DOS box.

rem " junk1" ------ creates a zero byte file
xcopy " junk1" " junk2"


- Franc Zabkar
--=20
Please remove one 's' from my address when replying by=20

email.
.



Hi Guy and thanks for the replies,

I havent had a chance to try out your DOS command (dir=20
*.dbf /b dirlist) just yet, but below is the command=20
I'm using to copy the files:

xcopy32 c:\fedext~1\*.* z:\fedex_trade /a/d/s/y

I've also used the /k/c witches without any success as=20
well... I've used this command on several 98se PCs with=20
success copying files with 'spaces' at the begining of=20
the file name, it's just this one PC that is giving me=20
trouble (98se as well).

Below is a DOS level directory dump comparison between=20
two PCs where the files copied successfully and my=20
problem PC.

Good PC: (as in the 'spaced' files will copy)
Volume in drive C is WIN98-2 =20
Volume Serial Number is 0675-17E7
Directory of C:\FedEx Trade Networks Forms

.. DIR 04/07/03 15:59 .
... DIR 04/07/03 15:59 ..
AIDE-N~1 FOF 51,308 25/07/02 18:25 Aide-NAFTA=20
Certificate.fof
HELP-C~1 FOF 419,954 25/07/02 18:25 Help-
Combination Custom Invoice and NAFTA Cert.fof
HELP-C~2 FOF 286,224 25/07/02 18:25 Help-Custom=20
Invoice with Shipper's Declaration.fof
HELP-C~3 FOF 272,937 25/07/02 18:25 Help-Custom=20
Invoice (no declaration).fof
HELP-C~4 FOF 38,529 25/07/02 18:25 Help-Custom=20
Form 7533-Inward Cargo Manifest.fof
HELP-N~1 FOF 50,228 25/07/02 18:25 Help-NAFTA=20
Certificate.fof
=FFCOMBI~1 DBF 13,914 29/01/03 10:11 =FFCombined=20
Invoice_NAFTA Cert.dbf
=FFCOMBI~1 FOD 193 02/02/04 13:12 =FFCombination=20
Custom Invoice and NAFTA Cert.fod
=FFCOMBI~1 FRM 977,945 29/01/03 10:09 =FFCombination=20
Custom Invoice and NAFTA Cert.frm
=FFINVOI~1 DBF 9,101 28/01/03 15:17 =FFInvoice=20
w_Shipper's Declaration.dbf
=FFCUSTO~1 FOD 197 14/07/03 16:21 =FFCustom=20
Invoice with Shipper's Declaration.fod

Problem PC: (as in the 'spaced' files will not copy)
Volume in drive C has no label
Volume Serial Number is 6D59-1A1C
Directory of C:\FedEx Trade Networks Forms

.. DIR 07-07-03 12:54p .
... DIR 07-07-03 12:54p ..
AIDE-N~1 FOF 51,308 07-25-02 6:25p Aide-NAFTA=20
Certificate.fof
HELP-C~1 FOF 419,954 07-25-02 6:25p Help-
Combination Custom Invoice and NAFTA Cert.fof
HELP-C~2 FOF 286,224 07-25-02 6:25p Help-Custom=20
Invoice with Shipper's Declaration.fof
HELP-C~3 FOF 272,937 07-25-02 6:25p Help-Custom=20
Invoice (no declaration).fof
HELP-C~4 FOF 38,529 07-25-02 6:25p Help-Custom=20
Form 7533-Inward Cargo Manifest.fof
HELP-N~1 FOF 50,228 07-25-02 6:25p Help-NAFTA=20
Certificate.fof
_COMBI~1 DBF 13,914 01-29-03 10:11a _Combined=20
Invoice_NAFTA Cert.dbf
_COMBI~1 FOD 245 07-07-03 2:02p _Combination=20
Custom Invoice and NAFTA Cert.fod
_COMBI~1 FRM 977,945 01-29-03 10:09a _Combination=20
Custom Invoice and NAFTA Cert.frm
_INVOI~1 DBF 9,101 01-28-03 3:17p _Invoice=20
w_Shipper's Declaration.dbf
_CUSTO~1 FOD 197 07-16-04 10:42a _Custom=20
Invoice with Shipper's Declaration.fod

Thanks,

Peter Poulimenakos