@echo off call :GetLine >"2.txt" move /y "2.txt" "1.txt" goto :eof :GetLine for /f "delims=" %%i in ('type "1.txt"') do ( echo,%%i goto :eof ) goto :eof复制代码