Sign in to follow this  
Followers 0
MPlb

Comparing file version numbers

4 posts in this topic

#1 ·  Posted (edited)

I want to write something that checks the version number of a file that is already present on a PC. If it is an old version I want to then copy the new version over the top of it.

I can get the version number with the FileGetVersion() command but it returns a value in the format 1.2.3.4. For example 6.0.84.50.

How can I accurately compare two versions numbers? Will I have to split it up into the four segments and check each one in turn?

Any ideas?

Thanks

Edited by MPlb

Share this post


Link to post
Share on other sites



#3 ·  Posted (edited)

Oooo these requests are always fun. I put a version up that allows for any number of octets and letters in the version number as well:

#418119

Edited by weaponx

Share this post


Link to post
Share on other sites

Oooo these requests are always fun. I put a version up that allows for any number of octets and letters in the version number as well:

#418119

Nice - I had missed that one....

[size="1"][font="Arial"].[u].[/u][/font][/size]

Share this post


Link to post
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
Sign in to follow this  
Followers 0