How do I compare two directories on cmd prompt of Windows m/c? I want equivalent of diff -r of UNIX.
The comp command for Windows is what you're looking for.
Here the example:
To compare the contents of the directory C:\Reports with the backup directory \\Sales\Backup\April, type:
comp c:\reports \\sales\backup\april
The easiest way would probably be downloading diff for Windows: http://gnuwin32.sourceforge.net/packages/diffutils.htm
You could also do something like:
dir directory1 > dir1
dir directory2 > dir2
comp dir1 dir2
Also, some versions of Windows comes with windiff
, however that is a GUI tool
In Windows 10 you can run diff
command in bash
by Enabling the Linux Bash Shell