回复 7# holley
好久未来了,给你来个更爽的。~~- @echo off
- setlocal EnableDelayedExpansion
-
- (for /f "tokens=1* delims=:" %%a in ('type %1') do (
- set "str=%%a"
- echo !str:~6,-1!|findstr "^[1-9]$">nul 2>nul&&echo !str:~0,6!00!str:~6,-1!!str:~-1!:%%b
- echo !str:~6,-1!|findstr "^[1-9][0-9]$">nul 2>nul&&echo !str:~0,6!0!str:~6,-1!!str:~-1!:%%b
- echo !str:~6,-1!|findstr "^[1-9][0-9][0-9]$">nul 2>nul&&echo !str:~0,6!!str:~6,-1!!str:~-1!:%%b
- ))>new.txt
-
- pause
复制代码 数字保留3位数。把文本拖上来。
============== |