Comparing 2 files

Discussion in 'Software' started by be0, Jul 21, 2005.

  1. be0

    be0 Corporal

    Suppose I have 2 Excel files and I wish to check if they are the same or not.
    Is there any software out there that will do that?
     
  2. da chicken

    da chicken MajorGeek

    It's built in to windows. Open a command prompt.

    Code:
    fc /b <path-to-first-file> <path-to-second-file>
    For example:

    Code:
    fc /b C:\Finance.xls I:\Finance.xls
    You'll either get a bunch of differences or a message that they're the same.
     
  3. be0

    be0 Corporal

    hmm I tried that already but witout /b
    what does /b do?

    thanks for the tip.
     
  4. be0

    be0 Corporal

    nm I got it.
     
  5. theefool

    theefool Geekified

    For those who wonder what the /b is, it is this:

    /B Performs a binary comparison.
     
  6. da chicken

    da chicken MajorGeek

    Yeah, if you don't do /b then fc will assume you're comparing ASCII or ANSI text files, and it spits out the differences raw to the console. This means you get a bunch of control characters outputing to the screen, which results in a whole bunch of beeps and pauses and other ugly stuff.
     
  7. be0

    be0 Corporal

    yeah but still this fc /b only works for txt files not xls or doc files.
    I was wondering if there was a program out the that does like a binary sort kind of thing except it compares 2 files, ignores ws and blanks.

    Shit i could program it to do that with my collage noob programming skillz.
     
  8. da chicken

    da chicken MajorGeek

    Oh, you want to know if the contents of each file are the same. As in in file1.xls cell b3 has $100. Does this match file2.xls?

    No. I have no idea how to do something like that beyond manual scanning. You could try exporting the files to comma delimited files (.csv) and then running fc /L /W on them.
     
  9. be0

    be0 Corporal

    hm thats a good idea. Yeah I do allot of Crystal reports at work. It is a pain comparing 2 files for equality when one is from the database and the other from an outside source.

    Thats alright thanks for your help.
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds