How to check if a volume/drive exists?
Is there a command to check if a drive/volume exists before using the CD command to change to it and run a script? This is because my User-Startup uses this command at the moment to change to DH4:, but not all my configurations have a DH4: and this command is being called from a WB HDF.
I thought "IF EXISTS DH4:" would work fine, but apparently not. EDIT: Reply if you like, but I think I've found a workaround if there's no solution to this issue. However, if there is a solution, then I'll happily accept it. |
Isn't there an "assign dh4: exists"?
|
Assign >NIL: exists dh4:
if not warn do something else dont bother endif |
Quote:
I've found a simple solution, and it works. Thanks, anyway. :) |
Quote:
Enquiring minds want to know!!!! ;-) Thanx |
Quote:
Now the User-Startup lines involved are simply: CD DH4: EXECUTE @ When I tried the script suggested by Acid, the DH4: wasn't executed either way, and to be honest, I'm still rusty on some AmigaDOS commands. At least I know what the two above lines do. :) |
Quote:
Acid's solution works fine so you most probably did it wrong. :) Easy check: Code:
assign >NIL: DH4: exists |
If you are using ARP, you can use the following :
Code:
IF EXISTS DH4: Quote:
|
Cool, it worked this time! :) Don't know what I did wrong before.
Thanks, StingRay, Acid and Malko! I guess I gave up too easily. |
check for cd
I know this is a old thread,but there is something on Aminet that may apply:
aminet.net/disk/misc/chkcd10.lha |
All times are GMT +2. The time now is 09:50. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.