『第
17 楼』:
再加一行代码可能就没有空行了。
@echo off
setlocal enabledelayedexpansion
for /f "delims=" %%i in (test.txt) do (
set str=%%i & set "str=!str: =!" & set "str=!str: =!" )
for /l %%j in (0,1,9) do (
if not "!str!"=="" set "str=!str:%%j=!")
for %%k in (a,b,c,d,e,f,g,h,i,j,k,l,m,n,,o,p,q,r,s,t,u,v,w,x,y,z) do (
if not "!str!"=="" set "str=!str:%%k=!")
if not "!str!"=="" (
>>new.txt echo !str!) else (
echo.)
notepad new.txt [ Last edited by weilong888 on 2007-4-29 at 10:03 AM ]
|