开发者

Log output from unrar.exe to a text file (Batch script)

开发者 https://www.devze.com 2023-04-07 11:51 出处:网络
I开发者_如何学JAVA am writing a batch script that extracts files and would now like to log the output from unrar.exe to a text file. The output I have in mind are things like failure due to corrupted

I开发者_如何学JAVA am writing a batch script that extracts files and would now like to log the output from unrar.exe to a text file. The output I have in mind are things like failure due to corrupted archives etc. or simply that the operation was successful.

Any ideas on how to solve this?

Thanks in advance!


You use redirection:

unrar > logfile.txt

To also redirect stderr:

unrar > logfile.txt 2>&1


Just the STDOUT

unrar>"output.txt"

Only the errors (ERROUT)

unrar 2>"errors.txt"

Both STDOUT and ERROUT

unrar 2>&1 "both.txt"

Or both in separate files:

unrar 2>"errors.txt" >"output.txt"

0

精彩评论

暂无评论...
验证码 换一张
取 消