Osa*_*ith 0 windows batch-file
我有这样的问题.假设我想将此代码写入文本文件.
echo taskkill/IM wscript.exe/F> null
我该怎么做?
感谢vendettamit,Matteo Italia和Roger Lipscombe :)
在批处理中,caret(^)是转义字符 ; 从而:
echo taskkill /IM wscript.exe /F ^>null >file.txt
Run Code Online (Sandbox Code Playgroud)
顺便说一句,我想你的意思是>NUL(>null只会将数据写入一个名为的文件中null).