Discussion:
CMD.exe not working always
(too old to reply)
DEE
2009-08-14 09:14:03 UTC
Permalink
Hi There ,

i am using a batach file to copy some files , this is a simple copy
operation extact command is below

COPY 1.txt "C:\Program Files\myfolder" /Y

this works most of the time . but in one particular machine it fails
to recognise the spaces . it while copying it just reads till the
first space (i,e, C:\Program ).

is there any settings/permision ,which i need to look int to.

i am totaly snaped with this behaviour . any help/comment would be
appreciated.

Thanks in Advance
Deepak
Pegasus [MVP]
2009-08-14 09:32:08 UTC
Permalink
Post by DEE
Hi There ,
i am using a batach file to copy some files , this is a simple copy
operation extact command is below
COPY 1.txt "C:\Program Files\myfolder" /Y
this works most of the time . but in one particular machine it fails
to recognise the spaces . it while copying it just reads till the
first space (i,e, C:\Program ).
is there any settings/permision ,which i need to look int to.
i am totaly snaped with this behaviour . any help/comment would be
appreciated.
Thanks in Advance
Deepak
I can think of two reasons:
a) You're not always using double quotes.
b) You're using command.com instead of cmd.exe.

If this is not the case then I suggest you do the following:
- Modify your batch file like so:
@echo off
echo %comspec% > c:\test.txt
COPY 1.txt "C:\Program Files\myfolder" /Y 1>>c:\test.txt 2>>&1
- Run the batch file.
- Paste the batch file into your reply.
- Paste the contents of c:\test.txt into your reply.

Loading...