本帖最后由 pcl_test 于 2017-3-31 17:42 编辑
比如这两个命令(命令可能不同)- wmic datafile where "drive='c:' and path='\\Windows\\' and filename='notepad'" get filename,size | find "notepad" >c:\1.txt
- wmic datafile where "drive='c:' and path='\\Windows\\' and filename='notepad'" get filename,size | find "notepad" >>c:\1.txt
复制代码 想让他们不换行,用下面的命令,可是没输出- @echo off
- for /f "tokens=*" %%i in ('wmic datafile where "drive='c:' and path='\\Windows\\' and filename='notepad'" get filename,size | find "notepad"') do ((set/p="%%i"<nul)>>"c:\1.txt")
- pause
复制代码 请教有没什么办法让多条命令的输出不换行 |