牛虻 当前离线
一级士官
TOP
apang 当前离线
上将
for /f "delims=" %%a in (a.txt) do ( if defined one (echo,%%a) else set "one=%%a" )复制代码
@echo off ( for /f "delims=" %%a in (a.txt) do ( if defined one (echo,%%a) else set "one=%%a" ) setlocal enabledelayedexpansion echo,!one! )>b.txt move b.txt a.txt复制代码
DAIC 当前离线
中将
@echo off set /p one=<a.txt (more +1 a.txt & echo,%one%)>b.txt复制代码
@echo off ( for /f "delims=" %%a in (a.txt) do ( if defined one (echo,%%a) else set "one=%%a" ) echo,%one% )>b.txt复制代码