Logic to Test for Presence of File and Check File Size

Hi Team,

Noob question here. I am creating a simple analysis that should simply check for the presence of a file in a directory and check to be sure the size of the file is greater than 0.

My logic, which i know is wrong, is…

(Exists file “Myfile.txt” of folders “C:\MyDir”) and (size of file “C:\MyDir\Myfile.txt” > 0)

My logic errors with “Error: Singular expression refers to nonexistent object”

Please help, if I may trouble anyone. Need to urgently correct and deploy.

Thank you,
Tony

This should work :
exists (file “c:\MyDir\Myfile.txt” whose (size of it > 0))

3 Likes

THANK YOU!!! It worked!