How to compare two folders in Win 7 prof 64bit

Anonymous
2010-01-13T19:30:57+00:00

I have two folders which has multiple files. I would like to compare both folders and see which folder has more files and what are their names? How do I do that in Win 7 prof 64bit? Is their any utility that I can download?

Windows for home | Previous Windows versions | Files, folders, and storage

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
Answer accepted by question author
Anonymous
2010-11-13T17:55:25+00:00

Hey dude-

Here's the right way to do it, without the external downloads.  It looks like a lot at first, but once you've done it, it's very easy.  It works in all Windows versions from 7 back to 95.  For our example assume that you're comparing two directories named 'A' and 'B'.

  1. run cmd.exe to get a command prompt.  (In Windows 7, the powershell won't work for this, FYI.)  Then do it again, so that you have two of them open next to each other.
  2. in each window go to the directories that you want to compare.  (Using 'cd' commands.  If you're not comfortable with this, then you should probably go with the external utilities, unless you want to learn command prompt stuff.)
  3. type 'dir /b > A.txt' into one window and 'dir /b > B.txt' into the other.  You'll now have two text files that list the contents of each directory.  The /b flag means bare, which strips the directory listing down to file names only.
  4. move B.txt into the same folder as A.txt.
  5. type 'fc A.txt B.txt'.  The command 'fc' means file compare.  This will spit out a list of the differences between the two files, with an extra line of text above and below each difference, so you know where they are.  For more options on how the output is formatted, type 'fc /?' at the prompt.  You can also pipe the differences into another file by using something like 'fc A.txt B.txt > differences.txt'.

Have fun.

Was this answer helpful?

200+ people found this answer helpful.
0 comments No comments
Answer accepted by question author
Anonymous
2010-01-14T18:43:08+00:00

Gujju dude,

Welcome to Microsoft Answers.

If you hover the pointer over the folder, it will display folder size and file information. If you do not have this activated, go to windows explorer > organize drop down > folder and search options > view > Select the Display file size information in folder tips check box, and then click OK.

I hope this helps.


Lisa

Microsoft Answers Support Engineer

Visit our Microsoft Answers Feedback Forum and let us know what you think.

Was this answer helpful?

60+ people found this answer helpful.
0 comments No comments

84 additional answers

Sort by: Most helpful
  1. Anonymous
    2011-02-04T21:37:20+00:00

    RE: SUBDIRECTORIES: Yes! Use 'dir /s /b > A.txt' and 'dir /s /b > B.txt'  You can also (rather than bare format) get a lot of other formatting options.  Just type 'dir /?' at the Command Promt to get a full list of everything you can put after 'dir' (which stands for "Directory" -- simply a command that says "Give me a directory listing of the contents of the folder I'm "in" currently")

    RE: PLACING FOLDERS SIDE-BY-SIDE, EXACTLY TOUCHING:

    There is! :-)

    Open two Explorer windows which show the folder(s) you want to compare.  Then just drag the title bar of either window to the left of your screen (hit the edge with your mouse) and you'll see the outline of the window show up to take up exactly half the screen on the left.  Let go of your mouse button and the window pops into exactly the LEFT 50% of the screen real estate (CMD Prompt windows don't QUITE take up 50% on a wide screen because they have a maximum fixed width but Explorer windows work fine)

    Do the same for the other Explorer window showing your folder, but this time to the RIGHT -- .. Click the title bar, drag to your right, hit the edge and let go.) and voila! you've got two windows perfectly matched to compare.

    Also works to drag the window up to the top of your screen and hit the edge to go full screen (maximized) view.

    Another *neat* little trick is if you want to ONLY show one window on your screen and minimize everything else, just grab the title bar with your mouse and SHAKE THE WINDOW REALLY HARD.  Everything but the window you're holding on to will minimize.  To bring everything back up, just shake your single Explorer window again and it all restores.

    All this having been said -- I agree with JB-Spain to a degree... I mean THANKS for putting these nifty window tricks in place -- but I really would have rather had some real power-user / file management tools in place. :-)   My friends all think I'm some sort of programmer / hacker phreak because I am constantly just opening up CMD Prompt and using Robocopy (hence my screenname) or the standard tools in CMD Prompt to do my work -- it has so much more available if you know what you're doing -- and I've been using DOS since about the time most of my coworkers were born. ;-)

    Hope this helps!

    Robo

    Was this answer helpful?

    7 people found this answer helpful.
    0 comments No comments
  2. Anonymous
    2011-12-24T19:19:22+00:00

    Just in case anyone else is looking . Here's a quick and dirty.

    Go to directory A. Select all and right-click to select "Cut"

    Go to directory B. Right-click and select "Paste"

    Windows will ask what you want to do if there a duplicate file in the destination: Move and Replace, Don't move or Move and keep both files.

    You can also tell Windows to do this for all subsequent occurrences.

    So, I picked move and replace. So, if the file isn't in the destination, it is moved there. If it _is_ there, it is replaced with the copy. Note that the time and date and file size tell Windows if this is an exact duplicate or not. Unless you have modified the time and date, you should be fine.

    My lazy way of consolidating backup directories. Hope this helps someone else :)

    Was this answer helpful?

    5 people found this answer helpful.
    0 comments No comments
  3. Anonymous
    2010-11-14T00:42:33+00:00

    Yes, a workaround in 7 (!) steps, and not at all easy for those not comfortable with a cmd prompt.

    Windows is, after all, meant to be a GUI OS!

    My (valid) point still stands and so does the download.

    Was this answer helpful?

    5 people found this answer helpful.
    0 comments No comments