Solved

Robocopy with spaces won't run

Posted on 2013-06-02
5
635 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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

Many admins will agree: WSUS is is a nice invention but using it on the client side when updating a newly installed computer is still time consuming as you have to do several reboots and furthermore, the procedure of installing updates, rebooting an…
Citrix XenApp, Internet Explorer 11 set to Enterprise Mode and using central hosted sites.xml file.
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…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

832 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