Testing for the existence of a Filesystem using an action parameter query

Hi,

I’m trying to run a ksh script, and I want to verify that a filesystem exists before running that ksh script.

I use the following to prompt for the filesystem name:

action parameter query “Filesystem” with description "Filesystem to clean, example /var "

then I use the following if / else / endif to run the script, or record an error, based of the if statement and the results of running the script:

if { (exists filesystem of folder “(parameter “Filesystem”)”) }
wait ksh __createfile
parameter “exit_code” = {exit code of action}
else
parameter “exit_code” = “99”
endif

Any help would be greatly appreciated!

Thanks,
Bob_K

Your relevance should work if you remove the quotes around the parameter, i.e.

if {exists filesystem of folder (parameter “Filesystem”)}

I don’t think this is what you really want to say though… The statement above will always return true as long as the folder exists, because filesystem of folder would return the filesystem where the folder resides. For example the filesystem of folder /var/test could be /var.

You’ll want to do this instead
if {exists filesystem (parameter “Filesystem”)}