Friday, July 14, 2017

Compare the Contents of Two Folders in Windows

This is a common problem with us, while we take the backup. We always create duplicate backup of backup... mean multiple backup for the same files.. as we don't know if that is already there or not.. so this is just a little trick to save some space by avoiding duplicate.. 

List the folder structure using TREE command:
TREE command can be extremely handy in this case. Suppose you want to compare the two folders (including file names) c:\SOURCE and c:\DEST, open a Command Prompt window and then type these commands:

d:\> TREE  D:\SOURCE /A /F >D:\SOURCE.TXT

d:\> TREE  D:\DEST /A /F >D:\DEST.TXT

This outputs each of the command results to separate text files in your d:\ drive’s root directory. The text files will have your directory structure in a tree format, which makes it easy for comparison work.

Quick Tip: To compare only the directories, remove the "/F" flag.

Next, fire up your text comparison utility like WinDiff, WinMerge or DiffMerge. Don’t have any of those? No problem! You can compare the two text files online via diffchecker.com.

Go to DiffChecker.com and paste the contents of d:\source.txt in one column, and D:\DEST.txt in another column. Click Find differences.

Enjoy little trick to same space in your disk...

No comments:

Post a Comment

Your feedback is always appreciated. I will try to reply to your queries as soon as time allows.Please don't spam,spam comments will be deleted upon reviews.