Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在编写一个提取文件的批处理脚本,现在想将 unrar.exe 的输出记录到文本文件中。我想到的输出是由于档案损坏等导致的失败,或者只是操作成功。
关于如何解决这个问题的任何想法?
提前致谢!
您使用重定向:
unrar > logfile.txt
还要重定向标准错误:
unrar > logfile.txt 2>&1
只是标准输出
unrar>"output.txt"
只有错误(ERROUT)
unrar 2>"errors.txt"
STDOUT 和 ERROUT
unrar 2>&1 "both.txt"
或两者都在单独的文件中:
unrar 2>"errors.txt" >"output.txt"