Solved

Robocopy with spaces won't run

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

by Nathan Brom/Bromy2004 Introduction There are numerous websites out there for any different type of program you can imagine.  Of those, you'll need to decide which ones are legitimate and aren't trying to steal your money or infect your comput…
INTRODUCTION The purpose of this document is to demonstrate the Installation and configuration of the Data Protection Manager product. Note that this demonstration was prepared on the basis of Windows OS is 2008 R2 and DPM 2010. DATA PROTECTI…
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…
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). …

746 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

9 Experts available now in Live!

Get 1:1 Help Now