Revert "Revert "Fix #191 improve bat file""

This reverts commit 8e1585e6e6f91c81a0bfced1e60ec1c13a1e3068.
Revert "Fix #192 improve filetype off"

This reverts commit 4396fc636c8afdb640e7200eec0e25aa387ab0aa.