Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I have a large number of HTML files that contain 2 lines of code that I need to remove.
For each file (e.g. DOC0001.html), I want to search for the specific string, delete that line and the next line after that, then save the file and do the same for all the other files.
Any ideas?

there is a way. you can use pipes "|" and the find command to delete a spicif string. I dont know how to do this but someone else might. I have one question for you. the 2 lines that you are talking about, are they the only 2 lines? so do you want it so the file is empty? if you do then you can do this...
echo echo. > DOC0001.html
I dont think this is what you wanna do. ask someone about the first option.

What you need can be found at:
http://www.virtualzone.de/multireplace/Their blurb on this Freeware:
Multi-Replacement Tool:
This Multi-Replacement Tool makes it easy to replace a specific text string in an unlimited number of files. You can specify a directory in which files are searched (and subdirectories), you can specify which file types are to be checked for an specified string. Within seconds, this tool can do the replacement job which would take you hours if you did it manually.
That SHOULD <grin> do the job for you. - Keep in mind that there are always many solutions to the same problem. If you are trying to strip Host advertising tags from your own Site Back-up, Text Editors like NoteTab Light (URL: http://www.notetab.com/ ) can load multiple files at once, and perform Global Search-and-Replace functions.
Baldy.

Hi Baldy,
You are a hero, that is the perfect solution. This has saved me hours of work. Many many thanks.

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |