Jump to content

comparing two files (command prompt) - win2k


Recommended Posts

I'm trying to create a .cmd file which i've completed except one little bit

I have a file downloaded automatically, I want to compare this to a file i already have. If the new file is different to the old file then to do some other commands (already written).When I mean the files are different i mean in terms of file size.

If anyone can help i'm looking for a way to compare newfile.exe to oldfile.exe

then return a boolean (true/false) so I can use that in an if statement

e.g.

if (oldfile.exe is different to newfile.exe)

do some commands

endif

I'm not sure how you can compare two files and return a boolean (true/false) so I can do my if statement.

thanks Rob :)

Link to comment
Share on other sites


Some basic programming code would be your best bet. As in Visual Basic, Visual C++, or maybe even QBasic. I'm not aware of a DOS command that runs a size compare...or even gets and stores the file's sizes in RAM for comparison then Prints it on screen.

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
  • Recently Browsing   0 members

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