Reputation: 32505
I know for dll files you can read an Assembly version, but I was wondering if there's some way to mark or read versions from ANY filetype (jpg for example). I'm making an update program that only updates what's necessary and it'd be better if all files were versioned instead of keeping track of versions in a separate file.
Oh and this is intended for winXP but if I there is a win7/windup solution that'd be awesome.
Upvotes: 1
Views: 329
Reputation: 992747
The version of an assembly is something that is specific to the assembly file format. A general "file" (such as a JPEG file) is just a bag of bits and the Windows filesystem doesn't have any "version" metadata associated with such a file.
One approach to solve your problem might be to compute a hash (such as using SHA1) over the content of the file. If you have two files and the SHA1 hashes match, then you can be pretty darn sure that the complete contents also match. (You can't be that sure with an embedded file version.)
Upvotes: 1