FileSystemObject : GetFileVersion Method


Returns the version number of a specified file.

Format : 

objectOfFileSystemObject. GetFileVersion (filespec)

objectOfFileSystemObject : As the name says, it’s a FileSystemObject.

    • filespec
      • Mandatory
      • Type:     String
      • Specific file path

Function FnGetFileVersion(strSpecificFilePath)

    Set fso = CreateObject("Scripting.FileSystemObject")

    file = fso.GetFileVersion(strSpecificFilePath)

   FnGetFileVersion = file

End Function


Msgbox  FnGetFileVersion (“c:\New Folder\file.txt”)


You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: