Solved

Robocopy with spaces won't run

Posted on 2013-06-02
5
631 Views
Last Modified: 2013-06-02
I have a command that I've used for all but one folder to copy data from our old server to the new one.
The main folder name has a space and I have tried with and without inverted commas to no avail.
Any ideas would be greatly appreciated

I have been using the following:

robocopy \\s01-old\folder\2011 folder \\s01-new\folder\2011 folder /E /Z /COPY:DATS /LOG:C:\copylog2011.txt /TEE /R:0 /W:0 /ETA
0
Comment
Question by:CaClo
  • 2
  • 2
5 Comments
 
LVL 25

Expert Comment

by:Tony Giangreco
ID: 39214347
Put double quotes around the full path that contains a space.

robocopy.exe "\\s01-old\folder\2011 folder"  \\s01-new\folder\2011
0
 

Author Comment

by:CaClo
ID: 39214361
I've tried for both the source path and destination path but still get nothing happening.

robocopy "\\s01-old\folder\2011 folder" "\\s01-new\folder\2011 folder" /E /Z /COPY:DATS /LOG:C:\copylog2011.txt /TEE /R:0 /W:0 /ETA

It still seems to 'see' the space :(
0
 
LVL 17

Accepted Solution

by:
Kent Dyer earned 200 total points
ID: 39214369
what you can try to do is to use DOS-16 style of pathing..

Do a DIR /X to get the truncated path and try the ROBOCOPY Command again?

If that does not work..  Try using a SET for the Source and Destination Folders..

SET SRCE = "\\s01-old\folder\2011 folder"
SET DEST = "\\s01-new\folder\2011 folder"

robocopy "%SRCE%" "DEST" /E /Z /COPY:DATS /LOG:C:\copylog2011.txt /TEE /R:0 /W:0 /ETA

If this still does not work..  Try running ROBOCOPY without the switches and just pure ROBOCOPY..

If ROBOCOPY still is not working..  Try just running XCOPY to see if you can run that.

HTH,

Kent
0
 
LVL 25

Assisted Solution

by:Tony Giangreco
Tony Giangreco earned 200 total points
ID: 39214432
If you are running this from the server where this drive exists, change the path to c:\folder\2011 folder  or D:\folder\2011 folder  instead of the path you are using.

If it's a server or workstation in your network, map that location as a drive and run it using the mapped drive letter live p:\folder\2011 folder
0
 

Author Closing Comment

by:CaClo
ID: 39215287
Thanks guys - really got me out of a bind - I went with a combination of setting Source & Destination & using the drive letter and that  has got the data across.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In a hurry?.. scroll down to "HERE's HOW TO DO IT" Section. Greetings All, I was going to post this as question/solution, but its seems more appropriate as an article considering its length.  I felt it important to illucidate all the details c…
This article covers how to install the Microsoft Windows Operating System (OS). What is covered in this article:  > Different Versions and Editions of the Windows OS  > Upgrading versus Fresh Installation of the OS           - Steps to take pr…
This video Micro Tutorial explains how to clone a hard drive using a commercial software product for Windows systems called Casper from Future Systems Solutions (FSS). Cloning makes an exact, complete copy of one hard disk drive (HDD) onto another d…
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …

861 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now