Within command scripts it is often necessary to execute commands
conditionally, based on the existance (or not) of a file. The
IfThere command provides this facility, building on the
conditional nature of the 'If' command.
*IfThere
<file>
Then
<true-command>
Else
<false-command>
<file> | - | File to check the existance of |
<true-command> | - | Command to execute if the file specified exists |
<false-command> | - | Command to execute if the file specified does not exist |
This command is used to check for the existance of a file. If the file exists, the 'true' clause will be executed. If the file does not exist, the 'false' clause will be executed.
*IfThere app$dir.file Then Echo File Exists
| Maintainer(s): | RISCOS Ltd <developer@riscos.com> | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| History: |
| ||||||||
| Disclaimer: |
Copyright © Pace Micro Technolgy plc, 2002. |