Jump to content

Recommended Posts

Posted

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.

Posted

I tend to drive robocopy from a batch file - hopefully this will be self explanatory :

 

 @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%

Posted

robocopy   /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.

  • Thanks 1
Posted
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.

  • Thanks 1

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...