• Advertisement
Sign in to follow this  

C++ how to find file version

This topic is 3317 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi all. Im not sure if this is a beginner topic but this forum seemed most appropriate. How would you go about finding the file version and/or file size of a random access file? ( I mean during runtime) Language: C++ Thanks in advance. Nick

Share this post


Link to post
Share on other sites
Advertisement
Which file version do you mean exactly? Generally, files don't carry version information at the level of file systems. But of course, specific file formats could do that (consider e.g. a text file, with the first line saying "Interpreter.Version = 0.3" or something like that). There are versioning file systems, but this isn't reliable information for your program (except you are writing some low level piece of software, that is targetted at ext3fs, for example; or some other specific file system).

Share this post


Link to post
Share on other sites
I mean like the file attribute(windows) like u can have version 4.2.7563.2432... If this isnt possible is there a way I can read the file size?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement