如何将diskpart的输出写入文件
问题描述:
我想将diskpart
命令的输出写入文件,即说类似
I want to write the output from a diskpart
command to a file, i.e., say something like
LIST PARTITION >c:\output.txt
我该怎么做?
答
您可以使用diskpart
的/s
选项(即
diskpart /s scriptfile.txt > output.txt
其中scriptfile.txt
包含要执行的命令,即
where scriptfile.txt
contains the command to be executed, i.e.,
LIST PARTITION