Robocopy quotation marks erro

A

Ales Baranek

I'm trying to write script with robocopy command but folders with a space in
the name (c:\program files) I cannot copy.
Therefore i tried the commands bellow, one witch quotation marks and second
without it.
Command with quotation marks ends with error No Destination Directory
Specified.
How to write command correctly?

Ales

=========================================================
robocopy.exe "C:\batch\" y:\companydata01\ /E /S /R:0 /W:0 /NP /NDL
-------------------------------------------------------------------------------
ROBOCOPY :: Robust File Copy for Windows :: Version XP010
-------------------------------------------------------------------------------
Started : Tue May 22 17:03:54 2007
Source : C:\batch" y:\companydata01\ \E \S \R:0 \W:0 \NP \NDL\
Dest -
Files : *.*
Options : *.* /COPY:DAT /R:1000000 /W:30
------------------------------------------------------------------------------
ERROR : No Destination Directory Specified.
Simple Usage :: ROBOCOPY source destination /MIR
source :: Source Directory (drive:\path or
\\server\share\path).
destination :: Destination Dir (drive:\path or
\\server\share\path).
/MIR :: Mirror a complete directory tree.
For more usage information run ROBOCOPY /? or read Robocopy.Doc.
NOTE: Read "True Replication" in Robocopy.Doc prior to first use of /MIR !
**** /MIR can DELETE files as well as copy them !
=========================================================
C:\Batch>robocopy.exe C:\batch\ y:\companydata01\ /E /S /R:0 /W:0 /NP /NDL
-------------------------------------------------------------------------------
ROBOCOPY :: Robust File Copy for Windows :: Version XP010
-------------------------------------------------------------------------------
Started : Tue May 22 17:04:04 2007
Source : C:\batch\
Dest : y:\companydata01\
Files : *.*
Options : *.* /NDL /S /COPY:DAT /NP /R:0 /W:0
------------------------------------------------------------------------------
------------------------------------------------------------------------------
Total Copied Skipped Mismatch FAILED Extras
Dirs : 1 0 1 0 0 0
Files : 9 0 9 0 0 0
Bytes : 329.8 k 0 329.8 k 0 0 0
Times : 0:00:00 0:00:00 0:00:00 0:00:00

Ended : Tue May 22 17:04:04 2007
 
M

Michael Bednarek

I'm trying to write script with robocopy command but folders with a space in
the name (c:\program files) I cannot copy.
Therefore i tried the commands bellow, one witch quotation marks and second
without it.
Command with quotation marks ends with error No Destination Directory
Specified.
How to write command correctly?

Ales

=========================================================
robocopy.exe "C:\batch\" y:\companydata01\ /E /S /R:0 /W:0 /NP /NDL

1) Directory specifications for Robocopy must not end with a
back-slash ("\").
2) Names with spaces must be surrounded by double-quotes.
 
Y

Yandos

I'm trying to write script with robocopy command but folders with a
space in the name (c:\program files) I cannot copy.
Therefore i tried the commands bellow, one witch quotation marks and
second without it.
Command with quotation marks ends with error No Destination Directory
Specified.
How to write command correctly?

Ales

I solve problems with spaces and different czech encoding (in notepad and in "dos") in directory
names using short names.

i.e. "c:\program files" -> "c:\progra~1" etc

use dir /x to view short names

Y.
 
A

Al Dunbar

Yandos said:
I solve problems with spaces and different czech encoding (in notepad and
in "dos") in directory
names using short names.

i.e. "c:\program files" -> "c:\progra~1" etc

use dir /x to view short names

Works, but... when you are copying folder trees, you generally want the
destination names to be the same as the source names. If you xcopied
"C:\progra~1" elsewhere, it would most probably wind up with its "long" name
and 8.3 name both being "progra~1" - unless of course, one were to script
the creation of individual folders and copy them one at a time. Yuk.

/Al
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top