Major & minor of file version

(imported topic written by lmpymilk91)

Can someone tell me how to get both the major and minor of a file version as a string while dropping the revision and build?

I will use msiexec.exe as an example…

q:if (exists file “msiexec.exe” of system folder) then first 3 of (version of file “msiexec.exe” of system folder as string) else “n/a”

A: 3.1

I would like to be able to get everything to the left of the second “.”

Thanks

(imported comment written by BenKus)

You can do some basic string manipulation of versions using the “preceding text” inspector:

q: preceding text of last “.” of preceding text of last “.” of (version of file “msiexec.exe” of system folder as string)
A: 4.0

Ben

(imported comment written by lmpymilk91)

Thanks Ben