• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 243
  • Last Modified:

Microsoft, Robocopy, help with odd backup scenario

I haven't used Robocopy in the past but a friend recommended it for a task I need.

We have an Archive folder which an internal application outputs files too. It builds the folder structure dynamically and inserts files into the folders based on filename.
For instanace under /Archive/ there may be a folder called /Archive/54CE8/ the next folder may be callled something entirely different  /Archive/56BE2/ for example.

I can't do any sort of backup based on folder name as it's randomly generated. So my thoughts were too backup based on *folder* timestamp, this is because I don't want half the files in the directory copied/backed up - I need all files within a directory..

Does anyone know how to get robocopy to backup all files within a directory based on timestamp?

I hope this makes sense! Any hints appreciated.
1 Solution
Malli BoppeCommented:
Robocopy source destination with the blow options
        /MAXAGE:n :: MAXimum file AGE - exclude files older than n days/date.
        /MINAGE:n :: MINimum file AGE - exclude files newer than n days/date.
        /MAXLAD:n :: MAXimum Last Access Date - exclude files unused since n.
        /MINLAD:n :: MINimum Last Access Date - exclude files used since n.
                     (If n < 1900 then n = n days, else n = YYYYMMDD date).

Other options would be use archive bit and reset the archive bit after its been copies so this way you need to only copy the new files.

/A :: copy only files with the Archive attribute set.
/M :: copy only files with the Archive attribute and reset it.

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now