GETFILESIZE

Purpose: Retrieve the size of a file (in bytes).

Format:    GETFILESIZE   variable    filename

Notes:      Use this statement to retrieve the size (in bytes) of the file specified by  filename.  The actual file size is written to the specified  variable.  If the file can not be accessed or does not exist then  variable  will equal  -1.  This can also be used to test the accessibility of a file.

Examples:

# Example 1
# Display the size of a file

getfile $fname “Select a file”
getfilesize a $fname
pause “The size of “ $fname “ is “ a “ bytes”
exit

# Example 2
# Wait for a file to be deleted

getfile $fname “Select a file to be deleted”

*Wait
 getfilesize a $fname
 breathe
 if a > -1
  goto wait
 endif

pause “The file was just deleted!”
exit