+ Post New Thread
Results 1 to 8 of 8
Scripts Thread, xcopy or robocopy? in Coding and Web Development; Please quick help with a simple problem for you lot i'm sure... I'm trying to copy from the old fileserver ...
  1. #1
    Sir
    Sir is offline

    Join Date
    Feb 2009
    Location
    The Space Bar
    Posts
    49
    Thank Post
    63
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    xcopy or robocopy?

    Please quick help with a simple problem for you lot i'm sure...

    I'm trying to copy from the old fileserver to a physical server so i can archive on disk the students that left last year. Copying and pasting is not working as it seems to only want to copy 5ish gb instead of 60!Trying to use xcopy but getting 'invalid parameters' and 'parse error' etc

    xcopy D:\users\intake2008\\*.* /s "\\winhost\c$\Leavers\2013 Student Leavers\*.*" /c/y/i/h/r

    I'm running this from the server where the files are currently

    I JUST NEED THE SPAAAAAAAACE............
    thanks for reading.

  2. #2
    AJWhite1970's Avatar
    Join Date
    Sep 2012
    Location
    Wiltshire
    Posts
    278
    Thank Post
    63
    Thanked 70 Times in 53 Posts
    Rep Power
    15
    Fastcopy is pretty good for this, I use it on all my overnight processes for moving data round to backups etc. Works as a GUI or loads of command line strings.

    FastCopy

    Andrew

  3. #3

    tmcd35's Avatar
    Join Date
    Jul 2005
    Location
    Norfolk
    Posts
    5,243
    Thank Post
    772
    Thanked 804 Times in 670 Posts
    Blog Entries
    9
    Rep Power
    299
    Once you learn the command line, nothing beats Robocopy IMHO.

  4. #4
    Sir
    Sir is offline

    Join Date
    Feb 2009
    Location
    The Space Bar
    Posts
    49
    Thank Post
    63
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    any chance of help with robocopy for this then.....? I just want the files off the server....

  5. #5


    Join Date
    May 2009
    Posts
    2,487
    Thank Post
    198
    Thanked 629 Times in 481 Posts
    Rep Power
    227
    I tend to drive robocopy from a batch file - hopefully this will be self explanatory :

    Code:
     @echo OFF
    SETLOCAL
    
    SET _what=/COPYALL /B /SEC /MIR
    :: /COPYALL :: COPY ALL file info
    :: /B :: copy files in Backup mode.
    :: /SEC :: copy files with SECurity
    :: /MIR :: MIRror a directory tree
    
    SET _options=/R:0 /W:0 /LOG:RepE2F.txt /NFL /NDL
    :: /R:n :: number of Retries
    :: /W:n :: Wait time between retries
    :: /LOG :: Output log file
    :: /NFL :: No file logging
    :: /NDL :: No dir logging
    
    SET _source=e:\WhereTheFilesAreNow
    SET _dest=g:\WhereWeWantTheFiles
    
    ROBOCOPY %_source% %_dest% %_what% %_options%

  6. #6

    tmcd35's Avatar
    Join Date
    Jul 2005
    Location
    Norfolk
    Posts
    5,243
    Thank Post
    772
    Thanked 804 Times in 670 Posts
    Blog Entries
    9
    Rep Power
    299
    Code:
    robocopy <source> <destination> /S /ZB /EFSRAW /COPYALL /MOVE /R:5 /W:10
    That should do it.

    /S and /MOVE copy everything in subdirectories and deletes the original
    /ZB /EFSRAW and /COPYALL pretty much means one way or another everything will be copied, including file attributes
    /R and /W sets the Retry and Wait time for the odd file that it can't copy.

    Don't use /MOVE if you want to keep the original files in place
    Use /E instead of /S if you want to copy empty folders

    Options exist for excluding specific files or folders, running continuously and monitoring/copying changes to a directory, and setting run times so it only runs within specified hours.

    Very useful command.

  7. Thanks to tmcd35 from:

    Sir (26th September 2013)

  8. #7
    Sir
    Sir is offline

    Join Date
    Feb 2009
    Location
    The Space Bar
    Posts
    49
    Thank Post
    63
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Hi this is all great- thanks but am i okay to write destination as \\servername\.....?

  9. #8


    Join Date
    May 2009
    Posts
    2,487
    Thank Post
    198
    Thanked 629 Times in 481 Posts
    Rep Power
    227
    Quote Originally Posted by Sir View Post
    Hi this is all great- thanks but am i okay to write destination as \\servername\.....?
    Yes, in that robocopy will take a networtk path but the copy will then depend on effective permissions on the servers.

  10. Thanks to pcstru from:

    Sir (26th September 2013)

SHARE:
+ Post New Thread

Similar Threads

  1. XCopy or Robocopy?
    By TBlax in forum Scripts
    Replies: 6
    Last Post: 22nd January 2013, 01:19 PM
  2. xcopy or robocopy - access denied
    By SBennett in forum Windows Server 2008 R2
    Replies: 4
    Last Post: 4th October 2012, 07:25 AM
  3. XCOPY / Robocopy Copy help
    By 01hanstu in forum Windows
    Replies: 3
    Last Post: 12th October 2010, 09:19 AM
  4. Ghost or software packaging?
    By eejit in forum Windows
    Replies: 25
    Last Post: 2nd August 2005, 10:06 PM
  5. Replies: 21
    Last Post: 2nd August 2005, 11:48 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 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
  •