PPRuNe Forums - View Single Post - Windows7 Batch Files - stumped!
View Single Post
Old 21st Apr 2014, 00:56
  #12 (permalink)  
Keef

Official PPRuNe Chaplain
 
Join Date: Apr 2001
Location: Witnesham, Suffolk
Age: 80
Posts: 3,498
Likes: 0
Received 0 Likes on 0 Posts
I used a set of batch files using xcopy to do backups of my "stuff" the way I like it. It all worked OK (had done for many years).

A couple of months ago, that stopped working, with no indication of why. So I rewrote the batch files to use robocopy. After a couple of "fixes", I got it working again as it did before.

...until I came to deleting old backups made with robocopy. The standard "delete" command wouldn't work on the backup folders - most of the stuff would go, then error messages appeared and the delete stopped, leaving a load of bits lying around. I've found a workaround now, but it's far more faff than ever xcopy was.

This is the robocopy command - can anyone see what in here locks some files where the xcopy equivalent didn't?

Code:
robocopy C:\Users\ R:\BU%date:~6,4%%date:~3,2%%date:~0,2%\C\Users\ *.*  /s /r:0 /copyall /xj /A-:SH
Keef is offline