Find the DIFFerence Between Two Folders on Windows Using robocopy

  1. Knowledge Base
  2. Data Management
  3. Find the DIFFerence Between Two Folders on Windows Using robocopy

If you have two folders of data that you would like to compare without any data transferring, you may do so using the robocopy differential “diff” command as follows.

Open a command prompt.

Enter the command at the C:> prompt

robocopy C:\Source\Path Z:\Destination\path /e /l /ns /njs /njh /ndl /fp /log:yyyyMMddHHmmss-MeaningfulLogFileName.txt

Explanation of command flags:

/e  Run command recursively through directory and sub-directories (including empty)
/l  List only, do not modify, move, or copy files
/fp  include the full path of files in log
/ns  Exclude file sizes in log
/ndl  Exclude folders in log
/njs   Exclude Job Summary
/njh   Exclude Job Header
/log:reconcile.txt   Write log to reconcile.txt (Overwrite if exists)
/log+: reconcile.txt   Write log to reconcile.txt (Appending to existing)

Leave a Reply

Your email address will not be published. Required fields are marked *