Page 2 of 2

Re: Test if a directory exists

Posted: Sat Oct 06, 2018 12:25 pm
by Andrew
Thank you Derek ! It works !!

Re: Test if a directory exists

Posted: Sat Oct 06, 2018 1:05 pm
by Derek_Stewart
Hi,

The file commnds are detailed in the Toolkit 2 manual.

It maybe worth looking at the manual as there many useful commands available.

Re: Test if a directory exists

Posted: Sat Oct 06, 2018 3:45 pm
by Andrew
I read the Toolkit II Manual - but reading it is one thing and remembering everything I read is a different thing :)
I have a very bad scan of the original manual - i had to guess a lot of the words.
Now I found on Dilwyn's site a very good copy of the manual !

Re: Test if a directory exists

Posted: Sun Oct 07, 2018 12:21 pm
by EmmBee
If you have Turbo toolkit, you could use ...

Code: Select all

DEFine FuNction valid_dir(dev$)
LOCal L
 L = LEN(dev$)
 IF L: IF dev$(L)="_": IF DEVICE_STATUS(1,dev$)>=0: IF FTYP(\dev$)=255: RETurn 1
 RETurn 0
END DEFine valid_dir
This works as the full directory name has to be supplied. It cannot get confused by the default directories of TK2.
EmmBee