我制作了一个批处理磁盘工具,全英文是因为dos下不能显示中文。可以进行格式化磁盘和检查磁盘,帮助文件暂时还没做,因为中文在dos下不能显示,英文我不会,如有大佬可以帮忙制作一下帮助文件,会给加四分技术,代码如下:- @echo off
- echo Disk_Utility;Dev0.1a
- echo Type"help",view help fill
- :start
- set /p sel_main=A=format;B=chkdsk:
- if %sel_main%=a goto format
- if %sel_main%=b goto chkdsk
- if %sel_main%=help "%cd%\duhelp.txt"
- goto start
- :format
- set /p sel=Type A=default format;Type B=customization format:
- if %sel% equ a goto def
- if %sel% equ b goto cus
- goto format
- :def
- set /p vol_lab=Volume label:
- set /p qui_for=Quick formatting[Y/N]?(If left blank, it defaults to y):
- if %qui% equ y format %vol_lab%: /q
- if "%qui%" equ "" format %vol_lab%: /q
- if %qui% equ n format %vol_lab%:
- echo Press any key to exit...
- pause>nul
- exit
- :cus
- set /p fs=Fill_System:
- set /p vol_lab=Volume_label:
- set /p sz=Sector_size:
- set /p qui_for=Quick formatting[Y/N]?(If left blank,it defaults to y):
- if %qui% equ y format %vol_lab%: /q /fs:%fs% /a:%sz%
- if "%qui%" equ "" format %vol_lab%: /q /fs:%fs% /a:%sz%
- if %qui% equ n format %vol_lab%: /fs:%fs% /a:%sz%
- echo Press any key to exit...
- pause>nul
- exit
- :chkdsk
- set /p vollab=Volume_label:
- chkdsk %vollab%: /f
- echo Press any key to exit...
- pause>nul
- exit
复制代码
|