@echo off :: aarunme.bat -- on an NT machine with ActiveState Perl, this fella :: will tidy up a mirror of the Slackware Book by exploding the inner table for %%f in (*.html) do call :func1 %%f goto :EOF :func1 echo %1 perl -ni.bak -e "print if /Norman/ .. /\/BODY$/" %1 :: this line replaces the missing ">" for the closing body tag echo ^> >> %1