wangdao6699 当前离线
一级士官
评分人数
pcl_test 当前离线
荣誉版主
@echo off & setlocal enabledelayedexpansion for /f "tokens=1-4 delims=." %%a in ('type "a.txt"') do set "n=00%%a" & set _!n:~-3!=%%a.%%b.%%c.%%d (for /f "tokens=2 delims==" %%b in ('set _') do echo,%%b)>"b.txt"复制代码
TOP
@echo off & setlocal enabledelayedexpansion for /f "tokens=1-4 delims=." %%a in ('type "a.txt"') do ( set "a=00%%a" & set "a=!a:~-3!" set "b=00%%b" & set "b=!b:~-3!" set "c=00%%c" & set "c=!c:~-3!" set "d=00%%d" & set "d=!d:~-3!" set "_!a!!b!!c!!d!=%%a.%%b.%%c.%%d" ) (for /f "tokens=2 delims==" %%b in ('set _') do echo,%%b)>"b.txt"复制代码
xxpinqz (YiFeng)当前离线
中校
@echo off & setlocal enabledelayedexpansion %1(for /f "tokens=2" %%a in ('%~0 :^|sort') do echo,%%a)>b.txt&exit /b for /f "tokens=1-4 delims=." %%a in (a.txt) do ( set/a #1=1000+%%a,#2=1000+%%b,#3=1000+%%c,#4=1000+%%d echo,!#1!!#2!!#3!!#4! %%a.%%b.%%c.%%d )复制代码