0

Using Robocopy, I’m trying to copy from a source to a destination across a network. The source and desination both have thousands of folders (they're a delayed replica of each other), but I want Robocopy to only look in directories of a certain age… Let’s say, two days old.

In other words, I don’t want Robocopy to enumerate anything past the root directory if it hasn’t been modified for two days. As it stands now, Robocopy is crawling the entire directory structure of the source and destination and it is taking hours.

2
  • /MAXAGE:n : MAXimum file AGE - exclude files older than n days/date.?
    – DavidPostill
    Jul 20, 2017 at 20:32
  • @DavidPostill I wish that worked, but Robocopy still has to crawl the directory structure to find the files that are of the max age. I can output to the console and have used Process Explorer to see it is crawling every folder. I wish there was a /maxage switch for folders instead of files. Jul 20, 2017 at 20:46

2 Answers 2

0

I suspect you are running Robocopy on the destination server and transferring files from a source server. This is why you are having terrible performance.

You'll get better performance by running robocopy on the source server and transferring over the network to the destination server.

1
  • I have similar performance issues even when running from the source, albeit not quite as bad. It doesn't appear that Robocopy has a switch to only touch root folders based upon creation/modification date. Jul 20, 2017 at 23:28
0

To increase robocopy performance you can try the switches:

/MT[:n] : Multithreaded copying, n = number of threads to use (1-128), default = 8 threads
/FFT : Assume FAT File Times (2-second date/time granularity)

One of the log switches:

     /LOG:file : Output status to LOG file (overwrite existing log).
  /UNILOG:file : Output status to Unicode Log file (overwrite)
    /LOG+:file : Output status to LOG file (append to existing log).
 /UNILOG+:file : Output status to Unicode Log file (append)

/NDL : No Directory List - don’t log directory names

Not to use the /Z or /ZB switches

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.