txt去空行

@echo off
set n=1
:3
if exist d:\new_%n%.txt (set /a n+=1&goto 3)
set file=%1
for /f "usebackq delims=" %%i in ("%file%") do (
echo %%i >>d:\new_%n%.txt
)
echo 处理完毕!
start "" d:\new_%n%.txt
pause>nul



保存.bat

你可能感兴趣的:(txt去空行)