1-5
变为
01-05的形式
@echo off&setlocal enabledelayedexpansion for /f "tokens=1,2 delims=-" %%a in (rq.txt) do ( echo 源串:%%a-%%b pause if 1%%a lss 100 (set var1=0%%a) else set var1=%%a if 1%%b lss 100 (set var2=0%%b) else set var2=%%b echo !var1!-!var2!>>test.txt ) del /q rq.txt ren test.txt rq.txt 1pause
时间: 2025-01-08 01:02:25