I have scripted StripBN.bat to strip blank and null lines from a file.
The syntax for using StripBN.bat is:
StripBN FileName
NOTE: StripBN.bat will also remove leading spaces on each line.
NOTE: If FileName can contain CMD control characters, as in a HTML file, use StripBNC.bat.
StripBN.bat contains:
@echo off If \{%1\}==\{\} @echo Syntax Call StripBN FileName&goto :EOF if not exist %1 @echo StripBN %1 not found.&goto :EOF setlocal set file=%1 copy %file% %TEMP%\StripBN.tmp del /q %file% for /f "Tokens=*" %%i in (%TEMP%\StripBN.tmp) do if \{%%i\} NEQ \{\} @echo %%i>>%file% endlocal
0 comments
Hide comments