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
echo Test case 2 exists
2008 Fridays: 4/4, 6/6, 8/8, 10/10, 12/12 and 5/9, 9/5, 7/11, 11/7.
Next year they're Saturday.
Measure wealth by the things you have for which you would not take money.
JP Software Forums" <[email protected]>; "Jim Cook wrote:
|| 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
| echo Test case 2 exists
My preference is IFF / ELSE / ENDIFF:
iff isfile whatever.file then
.. process whatever.file
echo whatever.file does not exist