+ Post New Thread
Results 1 to 3 of 3
Scripts Thread, Robocopy - Transfer files where the path has spaces? in Coding and Web Development; Morning, First off sorry if this is in the wrong place. I am looking for a little bit of help ...
  1. #1

    Join Date
    Jun 2010
    Posts
    387
    Thank Post
    35
    Thanked 57 Times in 54 Posts
    Rep Power
    32

    Robocopy - Transfer files where the path has spaces?

    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

  2. #2

    Join Date
    Jan 2008
    Posts
    152
    Thank Post
    12
    Thanked 29 Times in 27 Posts
    Rep Power
    21
    This is what I use,

    Code:
    robocopy "\\servername\directory name" "\\goingto\directory name" /e /sec /copyall /v /eta /tee /item
    Your code should read,

    Code:
    Robocopy "\\servername\driveletter\folder name with spaces" "\\Newservername\driverletter\exact foldername with spaces\placetocopyfiles" /copyall /e /r:3 w:1
    Last edited by chris_uk; 20th July 2011 at 08:55 AM.

  3. #3

    Join Date
    Jun 2010
    Posts
    387
    Thank Post
    35
    Thanked 57 Times in 54 Posts
    Rep Power
    32
    Quote Originally Posted by chris_uk View Post
    This is what I use,

    Code:
    robocopy "\\servername\directory name" "\\goingto\directory name" /e /sec /copyall /v /eta /tee /item
    Your code should read,

    Code:
    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!

SHARE:
+ Post New Thread

Similar Threads

  1. Copyright on Software if the publisher has gone bust?
    By Mr_T in forum Educational Software
    Replies: 12
    Last Post: 9th February 2011, 07:52 PM
  2. Finding files where the names have been obscured
    By alexharrington in forum Scripts
    Replies: 1
    Last Post: 16th November 2009, 10:28 AM
  3. Remove files in the recycle Bin at logoff
    By timbo343 in forum Windows
    Replies: 5
    Last Post: 14th November 2008, 06:14 PM
  4. The GP2X, has anyone got one?
    By NetDiag in forum *nix
    Replies: 14
    Last Post: 11th December 2006, 03:32 PM

Thread Information

Users Browsing this Thread

There are currently 2 users browsing this thread. (0 members and 2 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •