|
给你个批处理试试
@echo off&mode con lines=25 cols=90
color 0a
setlocal enabledelayedexpansion
echo list disk>%~dp0\DiskPart.txt
echo exit>>%~dp0\DiskPart.txt
diskpart /s %~dp0\DiskPart.txt
set /p choiceDisk_3=请输入要操作的磁盘编号---
echo select disk !choiceDisk_3!>%~dp0\DiskPart.txt
echo detail disk>>%~dp0\DiskPart.txt
echo exit>>%~dp0\DiskPart.txt
diskpart /s %~dp0\DiskPart.txt
echo select disk !choiceDisk_3!>%~dp0\DiskPart.txt
echo clean>>%~dp0\DiskPart.txt
echo convert gpt>>%~dp0\DiskPart.txt
diskpart /s %~dp0\DiskPart.txt
del /f /s /q %~dp0\DiskPart.txt
echo 任务结束! Congratulations!
pause>null
del /f /s /q %~dp0\DiskPart.txt
del /f /s /q %~dp0\null |
|