Jump to content

Trouble with large file compares


Recommended Posts

Hello all, and thank you for taking the time to look at my issue.

I am trying to compare 2 files and they are approximately 1/4 GB in size each (used as a dataset for testing tape data restores). All I need to know is if the files are identical, I don't need to know what the differences are between the files just if they are the same or not. I know about the winmerge and windiff but I need to do this within the running script and send the match/no match results to another function in the script.

Any way, I am currently doing an FC via comspec and its allright but can be very slow if large files don't match (because FC wants to list all the mismatches which is slow).

I tried to put the file into 2 arrays and then compare the arrays but then the system complains (throws an error) about memory usage.

Any ideas would help a lot. I have been through the forums but found little info.

Thanks

Link to comment
Share on other sites

  • Moderators

Did you try:

If FileGetSize("FileLocationName") == FileGetSize("FileLocationName") Then
    MsgBox(64, "Info", "Files are identical")
Else
    MsgBox(64, "Info", "Files are not identical")
EndIf

Edited by SmOke_N

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...