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.


# Example 1
# Display the size of a file

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

# Example 2
# Wait for a file to be deleted

getfile $fname “Select a file to be deleted”

 getfilesize a $fname
 if a > -1
  goto wait

pause “The file was just deleted!”