[Coco] OS9 Script Error Handling or File Testing ?
rickulland1 at gmail.com
Sat Jun 27 12:11:53 EDT 2020
shell 2.1 does what you want
if *test* then *statements* else *statements* endif
where test is
-y one char from stderr y=TRUE n=FALSE
-f path true if file exists
-r path true if file exists readable
-w path true if file exists writeable
-e path true if file exists and is execable
-d path true if file exists and is a directory
On 6/27/20 10:58 AM, coco at jechar.ca wrote:
> I want to make a script that will create some directorys and
> then do other things in those directorys. The problem is that
> maybe these directorys already exist causing the script to
> end prematurely with ERROR 218.
> I am running shell_21.
> Is there any way to tell the script just ignore errors and go to
> the next instruction anyway or is there a command or utility to
> test for the existence of a directory and allowing for conditional
More information about the Coco