JP Software Forums" <
[email protected]>; "Jim Cook wrote:
| ---Quote---
|| How can I use isfile within a .btm file to check for the existence
|| of another file and branch to true or false alternative logics?
| ---End Quote---
| Here are a couple of examples.
|
| echo Test file > NewFileName.TXT
| if ISFILE NewFileName.TXT (
| echo Test case 1 exists
| ) else (
| echo Text case 1 does not exist
| )
| if ISFILE DoesNotExist goto itexists
| echo Test case 2 does not exist
| quit
|
| :itexists
| echo Test case 2 exists
| quit
My preference is IFF / ELSE / ENDIFF:
iff isfile whatever.file then
.. process whatever.file
else
echo whatever.file does not exist
endiff
--
Steve