I am trying to [strong]move[/strong] files based on the last accessed time of the file being 2 days, using Robocopy. I am using the /MOVE switch that deletes the file after it is copied.
The script works but not on nearly as many files as I expected it to. In trying to figure out the problem, I select the properties of a random file remaining within the source directory or subdirectory. In most cases, the last accessed date shows as the time I ran the robocopy batch file. So of course the files would not move based on the last accessed date being only a few minutes old.
I then check the last accessed time of the files that did move to the target folder. They seem to change to the exact time I am viewing this property window of the file.
One thing to note is a difference found between files on the source and files on the target, is that the ownership changes from a wide variety on the source to them all being set to the local admin account on the target directory. This is also the account used to run the Robocopy batch file.
Any idea what is going on?
Software/Hardware used:
Windows 2003 R2 SP2 server 64 bit , HP BL20P
ASKED:
November 5, 2009 9:11 PM
UPDATED:
August 30, 2012 5:46 PM
What is the command you are using? It would help if you posted the relevant portions of your script.
Here is the command:
C:Toolsrobocopy “c:SourceDir” c:DestDir /s /MINLAD:2 /R:3 /W:3 /MOVE /NP /XD NoPurge >C:toolsTodaysPurges.log