155 pts.
 Windows Server 2003 Date Accessed information on files
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

Answer Wiki:
The command is probably working as it should, you just need to refine the options. As for permissions, you can add /COPY:DATS to copy security permissions otherwise, NTFS will set inherited permissions from the parent folder. You should probably avoid MINLAD because last access time is very sketchy. The second someone clicks on the file in explorer, it is accessed. If you want files not modified after 2 days you can use /MINAGE:2 I can get you a better command, if you let us know exactly what you are trying to accomplish. Hope this helps.
Last Wiki Answer Submitted:  November 7, 2009  1:26 am  by  mshen   27,310 pts.
All Answer Wiki Contributors:  mshen   27,310 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

What is the command you are using? It would help if you posted the relevant portions of your script.

 27,310 pts.

 

Here is the command:
C:Toolsrobocopy “c:SourceDir” c:DestDir /s /MINLAD:2 /R:3 /W:3 /MOVE /NP /XD NoPurge >C:toolsTodaysPurges.log

 155 pts.