Product Site

8.18. SysFileExists

Checks for the existence of a file. Returns 1 if any file system entity with the given name exists. In particular, this will return 1 for both regular files and directories.

Parameters:
filename

The name of the file to check for the existence of. The name does not support wildcard characters. On Unix-like systems, if the first character is a ~ (tilde) character optionally followed by a username, it is replaced by the current or specified user's home directory.

Returns:
0

The file does not exist.
1

The file exists.
Example 8.9. RexxUtil — SysFileExists
if SysFileExists(InputFile) then say "File Exists!"
else say "File does not exist."