format script improved
This commit is contained in:
parent
a0bce5123b
commit
35e0056405
@ -41,6 +41,7 @@ set DISK=
|
||||
|
||||
set FS=
|
||||
:askfs
|
||||
echo.
|
||||
set /p FS="Please select filesystem (exfat or fat32) [exfat]: "
|
||||
if /i "%FS%" EQU "fat32" (
|
||||
GOTO CONT2
|
||||
@ -57,6 +58,27 @@ set FS=
|
||||
:CONT2
|
||||
echo selected: %FS%
|
||||
|
||||
set SIZE=
|
||||
:asksize
|
||||
echo.
|
||||
echo IMPORTANT: maximum size for FAT32 is 32768!
|
||||
set /p SIZE="Please enter size in MB [max]: "
|
||||
|
||||
if /i "%SIZE%" EQU "" (
|
||||
GOTO CONT3
|
||||
)
|
||||
|
||||
echo %SIZE%| findstr /r "^[1-9][0-9]*$">nul
|
||||
if %errorlevel% neq 0 (
|
||||
echo Please enter an integer number!
|
||||
goto asksize
|
||||
) else (
|
||||
echo selected size = %SIZE% [MB]
|
||||
set SIZE=size=%SIZE%
|
||||
)
|
||||
:CONT3
|
||||
|
||||
echo.
|
||||
set LABEL=
|
||||
set /p LABEL="Please enter a label for the new disk: "
|
||||
|
||||
@ -85,7 +107,7 @@ rem =====
|
||||
@echo.select disk %DISK%
|
||||
@echo.clean
|
||||
@echo.convert MBR
|
||||
@echo.create partition primary
|
||||
@echo.create partition primary %SIZE%
|
||||
@echo.select partition 1
|
||||
@echo.format fs="%FS%" LABEL="%LABEL%" quick
|
||||
@echo.active
|
||||
|
Loading…
Reference in New Issue
Block a user