Test if a directory exists
-
- Font of All Knowledge
- Posts: 3971
- Joined: Mon Dec 20, 2010 11:40 am
- Location: Sunny Runcorn, Cheshire, UK
Re: Test if a directory exists
Hi,
The file commnds are detailed in the Toolkit 2 manual.
It maybe worth looking at the manual as there many useful commands available.
The file commnds are detailed in the Toolkit 2 manual.
It maybe worth looking at the manual as there many useful commands available.
Regards,
Derek
Derek
Re: Test if a directory exists
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 !
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
If you have Turbo toolkit, you could use ...This works as the full directory name has to be supplied. It cannot get confused by the default directories of TK2.
EmmBee
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
EmmBee