| View previous topic :: View next topic |
| Author |
Message |
noveltech Contributor

Joined: 16 Sep 2002 Posts: 105
|
Posted: Mon Sep 16, 2002 9:30 pm Post subject: verify file existance, execute if exist, else messagebox! |
|
|
Could someone provide an example for
verifying file existance, execute if exist, else messagebox and then return to program.
Thank you. Jen. |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Mon Sep 16, 2002 9:36 pm Post subject: |
|
|
| Code: |
if @file("c:\windows\notepad.exe")
RUN "c:\windows\notepad.exe"
else
WARN Cannot find "c:\windows\notepad.exe"...
end
|
Cheers, Mac  _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
 |
|
| Back to top |
|
 |
LOBO Valued Contributor


Joined: 14 Mar 2002 Posts: 241 Location: Wilmington, Delaware, USA
|
Posted: Mon Sep 16, 2002 9:40 pm Post subject: |
|
|
Just a quick little code snippet example using shell open or you can use run.
| Code: |
%%file = "c:\textfile.txt"
if @file(%%file)
shell open %%file
else
warn %%file does not exist
end
|
Regards,
Mark
Edit: Looks like Mac beat me to it  |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Mon Sep 16, 2002 9:51 pm Post subject: |
|
|
That's just good teamwork LOBO. I gave a RUN
example and you gave one for SHELL...
One more note....
Check the help file under RUN and SHELL, there
are some variations of RUN (RUNH, RUNM, RUNZ)
and some optional parameters for SHELL.
Cheers, Mac  _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
 |
|
| Back to top |
|
 |
|