The postings on this site are my own and do not represent my Employer's positions, advice or strategies.

LifeAsBob - Blog

 

Home

No Ads ever, except search!
Friday, April 19, 2024 Login
Public

Copy all files created today 11/18/2015 6:31:08 AM

Recently needed to copy all files created today to another server, robocopy for this one.

https://social.technet.microsoft.com/Forums/windowsserver/en-US/81604b98-770d-4008-9e3f-95a3239ac6a2/robocopy-powershell-script-to-copy-files-created-today

Aneesh, you could just do /MAXAGE:1 which will only copy today files.

Robocopy \\source \\destination /s /MAXAGE:1

or you could try following

$today = get-date -Format yyyyMMdd
robocopy \\source \\destination /s /maxage:$today
 
 

Blog Home