Robocopy MAXAGE / MINAGE with hours and minutes

I try to copy files from a server to another server every hour as created files. I used Robocopy to copy the file, and it is very useful. But now I'm really stuck with that. I need to copy files with MINAGE minutes value, something like this.

if I started robocopy after 2pm, I would only have to copy the file created before 2PM

Robocopy MAXAGE and MINAGE only accept date, not time.

Any suggestion

+6
source share
3 answers

Why don't you use the MIR function and run the task every 60 minutes using the task scheduler?

: /mot: M , .

( ):

Copy-Item c:\src\*.* -filter (Get-ChildItem | Where{$_.CreationTime -ge (Get-Date).AddMinutes(-60)}) "C:\dest\"

0

xxcopy /.

-2

MINAGE and MAXAGE refer to the date the file was created.

MINLAD and MAXLAD refer to the most recent file entries.

Use a combination of both.

Source: http://social.technet.microsoft.com/Forums/scriptcenter/en-US/b5cb685e-32f6-4eed-855d-e710ca4b203f/what-is-the-date-in-robocopys-minage-

-4
source

All Articles