_BATCHTYPE returns the file type of the current batch file:
value
meaning
-1
not in a batch file
0
normal
1
compressed
2
encrypted