- Jun
- 794
- 7
I don't understand what is happening with the following btm file. Without the "on errorlevel" statement, it works fine.
C:\Junk>dir
Volume in drive C is OS Serial number is 1ce5:1203
Directory of C:\Junk\*
3/12/2011 6:04p DIR .
3/12/2011 6:04p DIR ..
3/12/2011 6:03p 256 Foo.btm
3/12/2011 5:54p 745,282 ZippedListDownload1.zip
745,538 bytes in 2 files and 2 dirs 749,568 bytes allocated
146,656,620,544 bytes free
C:\Junk>type Foo.btm
*on errormsg cancel
*on errorlevel ge 1 cancel
*setlocal
*unalias *
echo on
alias Extract=`iff %@filesize[%1.zip] gt 200 then %+ unzip /o /q %1.zip %+ else %+ %=
echo Missing or bad %1 file %+ endiff`
Extract ZippedListDownload1
C:\Junk>Foo.btm
alias Extract=`iff %@filesize[%1.zip] gt 200 then %+ unzip /o /q %1.zip %+ else %+ echo Missing or bad %1 file %+ endiff`
iff %@filesize[ZippedListDownload1.zip] gt 200 then
cancel
C:\Junk>dir
C:\Junk>cd \
C:\Junk>dir
C:\Junk>ver /r
C:\Junk>
At this point, the console ignores whatever I type and just returns a prompt. The result is the same if I run TCC inside TC or standalone.
TCC 12.01.44 Windows Vista [Version 6.0.6002]
C:\Junk>dir
Volume in drive C is OS Serial number is 1ce5:1203
Directory of C:\Junk\*
3/12/2011 6:04p DIR .
3/12/2011 6:04p DIR ..
3/12/2011 6:03p 256 Foo.btm
3/12/2011 5:54p 745,282 ZippedListDownload1.zip
745,538 bytes in 2 files and 2 dirs 749,568 bytes allocated
146,656,620,544 bytes free
C:\Junk>type Foo.btm
*on errormsg cancel
*on errorlevel ge 1 cancel
*setlocal
*unalias *
echo on
alias Extract=`iff %@filesize[%1.zip] gt 200 then %+ unzip /o /q %1.zip %+ else %+ %=
echo Missing or bad %1 file %+ endiff`
Extract ZippedListDownload1
C:\Junk>Foo.btm
alias Extract=`iff %@filesize[%1.zip] gt 200 then %+ unzip /o /q %1.zip %+ else %+ echo Missing or bad %1 file %+ endiff`
iff %@filesize[ZippedListDownload1.zip] gt 200 then
cancel
C:\Junk>dir
C:\Junk>cd \
C:\Junk>dir
C:\Junk>ver /r
C:\Junk>
At this point, the console ignores whatever I type and just returns a prompt. The result is the same if I run TCC inside TC or standalone.
TCC 12.01.44 Windows Vista [Version 6.0.6002]