Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- :clean
- echo Making partitions
- :disks
- cls
- (
- echo list disk
- )>list.txt
- diskpart /s list.txt
- echo:
- set /p disk=Please enter the disk number:
- if [%disk%]==[] (goto disks)
- cls
- (
- echo sel disk %disk%
- echo clean
- echo list disk
- )>sel.txt
- diskpart /s sel.txt
- if %errorlevel% neq 0 echo:&&pause&&goto disks
- for /f "tokens=6,7 delims= " %%a in ('echo list disk ^| diskpart ^| find "Disk %disk%"') do set mb=%%a&&set un=%%b
- if "%un%"=="GB" set /a mb=%mb%*1024&&set un=%un:GB=MB%
- :parts
- echo:
- set part=0
- set /p part=Enter size OS partition in MB (min. 2100 MB, max. %mb% %un%):
- set /a p=%part%
- if %p% gtr %mb% echo:&&echo The size %part% MB is large than %mb% MB&&goto parts
- if %p% equ 0 echo:&&echo Please enter digit (not zero)&&goto parts
- if %p% lss 2100 echo:&&echo The size %part% MB is small than 2100 MB&&goto parts
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement