如何将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