LocalTestFile exists|readaccess|writeaccess|notexists|older|younger <filename>
RemoteTestFile exists|notexists|older|younger <filename>
The LocalTestFile and RemoteTestFile commands check for existence of a file in the current directory of the local or remote computer. The command passes when the file status correlates to the state given in the first parameter, otherwise it fails. It is useful in conjunction with an OnError command to skip parts of the program, depending on the existence or non-existence of a file.
With older/younger a timespan (not a time on the clock!) needs to be provided after a colon in the format hh:mm:ss, e.g. RemoteTestFile older:02:30:00 "data.xls". Depending on if the file is older or younger than this span of time (2 and a half hours) or not, the result will be OK or ERROR.
RemoteChDir "data"
OnError SkipTo "Next"
RemoteTestFile exists "trigger.dat"
// Process something here
...
:Next
// more program
...
Disconnect
See also: OnError
← Back to Script Commands