Solved

Robocopy with spaces won't run

Posted on 2013-06-02
5
643 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

Question has a verified solution.

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

Many times while working on a computer regardless of any Operating System, lag and crashes seem to creep in, hindering your working speed. Sometimes, it can also cause your work to be lost unexpectedly and as a result, you are unable to meet your de…
The password reset disk is often mentioned as the best solution to deal with the lost Windows password problem. In Windows 2008, 7, Vista and XP, a password reset disk can be easily created. But besides Windows 7/Vista/XP, Windows Server 2008 and ot…
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…
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…

710 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