稍微美化了一点:- @echo off
- title Delay divider
- cd /d %~dp0
-
- :start
- cls
- echo.
- echo The script will divide all the numbers by 100.
- echo Please put all the number segments to be divided in 1.txt.(Only integers are supported)
- echo Then enter start to start.
- echo All the results will be in 2.txt
- echo.
- set /p "input=Please enter start to start:"
- if /i "%input%"=="start" goto start0
- cls
- echo ERROR!
- echo Please push any key to restart.
- pause>nul
- goto start
-
- :start0
- cls
- echo loading...
- setlocal EnableDelayedExpansion
- set "inputFile=1.txt"
- set "outputFile=2.txt"
- if exist "%outputFile%" del "%outputFile%"
- for /f %%a in ('type "%inputFile%"') do (
- set /a "result=%%a/100"
- echo !result!>>"%outputFile%"
- )
- echo Done!
- echo Please push any key to restart.
- call 2.txt
- pause>nul
- goto start
复制代码
|