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
You can use windiff util included in Windows from NT version and up. Just run 'windiff' and a graphic tool will pop up.
File -> Compare directories
http://msdn.microsoft.com/en-us/library/aa266122(VS.60).aspx
This article describes how to use it from command line. Great benefit of this tool is that it is already included and you don't need to download and install anything.