Here is a very basic one:
:SET &agent = "Agent name" ! Windows Agent name where the file exists
:SET &file = "c:\the.full.path.to.the\file.txt"
:SET &size = GET_FILESYSTEM(&agent,&file,PATH_SPACE_USED,BYTES)
:PRINT "Size of &file: &size Bytes"
! Additional logic to communicate result such as
! STOP NOMSG if subsequent tasks are not to be executed.
Be certain to read the Comments section for the GET_FILESYSTEM function in the UC4 Script Guide.
The Event would require that you choose an Event File Template from the pull-down when creating a new object. Then, complete the attributes on the File System tab and others as appropriate.