If you want to save the contents of a BAT file, you could just save a copy of it.
copy batch.bat batch.bat.txt
To log the bat file’s output, do something like:
waithidden cmd batch.bat > log.txt
There are some specifics to this which are in a previous post somewhere.
###Related: