Capturing file size in analysis

(imported topic written by carroll91)

Hoping someone can lead me in the right direction. I have a small analysis that captures the version of a file. I would also like to get the size of the file in the ouput. I know how to get modified date etc. but the syntax to capture size escapes me.

if (exists files “pms2.isl” of folders “C:\MICROS\RES\POS\Etc”) then version of file “pms2.isl” of folder “c:\MICROS\RES\POS\Etc” as string else “n/a”

Cheers,

Carroll

(imported comment written by Lee Wei)

2 examples that you might be able to use:

if (exists files “pms2.isl” of folders “C:\MICROS\RES\POS\Etc”) then size of file “pms2.isl” of folder “C:\MICROS\RES\POS\Etc” as string else “n/a”

if (exists files “pms2.isl” of folders “C:\MICROS\RES\POS\Etc”) then (version of it as string & " - " & (size of it/1024) as string & “KB”) of file “pms2.isl” of folder “C:\MICROS\RES\POS\Etc” as string else “n/a”

Lee Wei

(imported comment written by carroll91)

Thank you very much Lee for your assistance. This worked:

if (exists files “pms2.isl” of folders “C:\MICROS\RES\POS\Etc”) then size of file “pms2.isl” of folder “C:\MICROS\RES\POS\Etc” as string else “n/a”

Have a great weekend!