Jump to content
EduGeek EdSec 2026 is Go! 27th Oct in Derby! Join us for a day of EdTech security focused talks, networking, and an evening social ×

Robocopy - Transfer files where the path has spaces?


Recommended Posts

Posted

Morning, First off sorry if this is in the wrong place.

 

I am looking for a little bit of help - I am trying to transfer some files from a location on one server to a location on another server using Robocopy. However the path and destination both have spaces in them for example of the code below

Robocopy \\servername\driveletter\folder name with spaces \\Newservername\driverletter\exact foldername with spaces\placetocopyfiles /copyall /e /r:3 w:1

When i run it i get an error saying that the destination contains an invalid perameter and surrounds the destinations with " " marks.

 

Tried putting " " marks all over the show and nothing seems to work. Will robocopy handle what i want it to do and if so how?

 

Cheers

Posted (edited)

This is what I use,

 

robocopy "\\servername\directory name" "\\goingto\directory name" /e /sec /copyall /v /eta /tee /item

 

Your code should read,

 

Robocopy "\\servername\driveletter\folder name with spaces" "\\Newservername\driverletter\exact foldername with spaces\placetocopyfiles" /copyall /e /r:3 w:1

Edited by chris_uk
Posted
This is what I use,

 

robocopy "\\servername\directory name" "\\goingto\directory name" /e /sec /copyall /v /eta /tee /item

 

Your code should read,

 

Robocopy "\\servername\driveletter\folder name with spaces" "\\Newservername\driverletter\exact foldername with spaces\placetocopyfiles" /copyall /e /r:3 w:1

 

Cheers for reply Chris, I think thats nailed it! I put " before the \\servername and after the directory name as well as removing the \ at the end! Looks like it running through!

Today maybe a good day afterall!

Thanks again!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...