Link to home
Start Free TrialLog in
Avatar of mark_at_acc
mark_at_acc

asked on

I need a smarter copy program

I do a lot of drive backups to a tmp drive, then after wiping the original drive and installing a new OS, I copy all the data back into a directory like c:\BACKUP.  Let's just always assume it's winXP.

Problem is, sometimes I get a lot of "access denied" messages when doing the copy using windows explorer.  The message doesn't give a full path (making it hard to find the problem file), and the biggest pain is, it stops the copy process cold.  So I have to subdivide and recopy and narrow down till I get it copied, or do searches for the problem file(s).  Usually the problem files don't usually need to be copied, but I am FORCED to find the problem in order to skip copying it, in order to get the rest of the data...whew!

I need a smart copy program that will (1) continue the 'copy' process past the files that won't copy, and (2) when finished, either give a message or write to a log file which files/directories could not be copied if any.  OR, I need a program that will set or clear whatever bit is causing "access denied" on all files on the drive, so I can then copy it without problems.

Is there any such progam?  I hit this problem constantly and am not sure what's the solution.  Thanks!
Avatar of scampgb
scampgb
Flag of United Kingdom of Great Britain and Northern Ireland image

Hi mark_at_acc,
Sounds like you need Robocopy from the WIndows resource kit.

You can find out more about this at http://www.ss64.com/nt/robocopy.html

It's a command-line utility, that can recursively copy files, understands security permissions and can continue even after errors.
Avatar of mark_at_acc
mark_at_acc

ASKER

Robocopy has potential for solving the problem, but, I am not seeing an explicit switch for "continuing even after errors", unless this:

/ZB :: use restartable mode; if access denied use Backup mode.

does it.  What is backup mode?  What I do see is that it continues to RETRY failed copies, but, nothing seems to indicate it will skip failures and go on.  I also see the logging switches, but, I was hoping to get a list of all failures at the end, not one at a time...

Do you have experience with it so you can advise?  If not I'll just go for it, but am leary of the "delete from source" potential.  I cannot lose the source!  I appreciate this..  Thanks Agaiin!  
ASKER CERTIFIED SOLUTION
Avatar of scampgb
scampgb
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Lee W, MVP
XCOPY has such a switch.  Personally, if you're doing a backup, I'd use the Windows XP Backup program and backup to a file.  You don't miss anything (and you check the log files to confirm it got everything).
Is this logging overkill:

  robocopy source dest /r:1 /E /V /W:1 /TEE /V /LOG:c:\robo_log.txt

Maybe /V does it all?  I just don't want to use conflicting log switches, but also don't want to lose data output.  I like /TEE so I see what's going on.  After this I'll leave you alone and give you the points, you rock!
I went with it and it works great!
Glad I could help :-)