-
diskpart 사용법컴퓨터/배치파일 2016. 7. 17. 13:30
http://reboot.pro/topic/21174-uefi-bootmgr-wipe-ideas/?p=199553
echo list disk | diskpart
set /p "diskNumber=Type number of disk to format: "
( echo select disk %idiskNumber%
echo list disk
) | diskpart
::pause
set "scriptFile=%temp%\%~nx0.%random%%random%%random%.tmp"
> "%scriptFile%" (
echo SELECT DISK %diskNumber%
echo CLEAN
echo CREATE PARTITION PRIMARY
echo FORMAT QUICK FS=NTFS
echo ACTIVE
echo ASSIGN LETTER="C"
)
diskpart /s "%scriptFile%"
del /q "%scriptFile%"
--------------------------------------------------------------------------------
C:\>foo\bar.cmd
%0 = foo\bar.cmd
%~f0 = C:\foo\bar.cmd ( %~dpnx0 )
%~d0 = C:
%~p0 = \foo\
%~n0 = bar
%~x0 = .cmd
C:\>D:\dirshow.bat
this is %cd% C:\
this is %~dp0 D:\
cd /d i:\windows\system32
-----------------------------------------------------------------------------
det dis detail disk
댓글