Saved Bookmarks
| 1. |
Solve : Remove lines from text files in a directory (keeping original file name)? |
|
Answer» Can someone help me? I have a directory full of html files, in the html files, I want to remove all LINES that have "xxx This is untested: THANK you... This was right... I was running it in command prompt - so i changed %%a to %a. I didn't want to get prompted on the moving of files, so I added a /Y to the move command... THank you so MUCH. Final command: Code: [Select]echo off for /f "delims=" %a in ('dir *.htm /b /a-d ') do findstr /v /i /c:"<li" "%a" > "%a.tmp" & move /Y "%a.tmp" "%a" |
|