I have this robocopy script that I’m testing out before putting into the production environment…

robocopy Z:\Docs E:\Backup /e /zb /copy:dats /move /minlad:30 /vb

But the test files I’m trying to move all come back as being too new in the verbose output log despite having last modified dates from December 2012.

Ideas?

rb.jpg

3 Spice ups

Does it work if you change your copy mode to /COPYALL ? or if you change dats to datsu?

Nope, still says too new.

/minage:0 ?

1 Spice up

Still the same I’m afraid…

If those are just standalone files (not folders) then I would try removing the /e since there are no sub folders to copy.

There are files that are in the root directory and then files that are inside sub directories. I want to move them all where they meet the minimum age constraint.

Anyone have any ideas with this?

You are trying to filter based on the Last Access Date, which is completey different from the last modified date. Often just browsing a folder in Windows Explorer will update acess timestamp on all files in that folder.

I would try using /MINAGE instead of /MINLAD and see if that resolves the issue.

4 Spice ups

That works a treat but its the last time that the file was modified that I need as I’m looking to deploy this script on a 1TB file server to move everything thats not been touched in 18 months onto our Archive machine.

From the attached:

/MAXAGE:n Excludes files with a Last Modified Date older than n days or specified date. If n is less than 1900, then n is expressed in days. Otherwise, n is a date expressed as YYYYMMDD.
/MINAGE:n Excludes files with a Last Modified Date newer than n days or specified date. If n is less than 1900, then n is expressed in days. Otherwise, n is a date expressed as YYYYMMDD.
/MAXLAD:n Excludes files with a Last Access Date older than n days or specified date. If n is less than 1900, then n is expressed in days. Otherwise, n is a date expressed as YYYYMMDD.
/MINLAD:n Excludes files with a Last Access Date newer than n days or specified date. If n is less than 1900, then n is expressed in days. Otherwise, n is a date expressed as YYYYMMDD.

So, MINAGE should do it, as Brent says.

robocopy.pdf (120 KB)

3 Spice ups

I had suggested the same thing.

1 Spice up

Agreed ^^

1 Spice up