How to replace multiple lines

Tool for Search and Replace across multiple files.
Post Reply
Docfxit
Posts: 2
Joined: Tue Mar 04, 2014 3:04 pm

How to replace multiple lines

Post by Docfxit »

I would like to figure out how to replace multiple lines like this:

<meta name="msapplication-task" content="name=Sign up for a free blog;action-uri=http://signup/;icon-uri=http://s2.wp.com/i/favicon.ico" /><meta name="msapplication-task" content="name=Support;action-uri=http://support/;icon-uri=http://s2.wp.com/i/favicon.ico" /><meta name="msapplication-task" content="name= Forums;action-uri=http://forums/;icon-uri=http://s2.wp.com/i/favicon.ico" /><meta name="title" content="Posts by me | " />

With Nothing.

I have many htm files.
I cannot seem to figure out how to do batch find / replace.

1. I click the tab "Input file" It won't let me enter *.htm
2. click tab batch commands
3. click batch editor
4. click load ... my TextcrawlerScript.txc
5. Nothing shows up in the batch editor.

TextcrawlerScript.txc

Code: Select all

    //TextCrawler Script File 1.0

    !Find
<meta name="msapplication-task" content="name=Sign up for a free blog;action-uri=http://signup/;icon-uri=http://s2.wp.com/i/favicon.ico" /><meta name="msapplication-task" content="name=Support;action-uri=http://support/;icon-uri=http://s2.wp.com/i/favicon.ico" /><meta name="msapplication-task" content="name= Forums;action-uri=http://forums/;icon-uri=http://s2.wp.com/i/favicon.ico" /><meta name="title" content="Posts by me |  " />
    !Replace
    !Options
    Non-RegEx
    !Comment

    !End
Thank you for a really great program,

Docfxit
User avatar
DigitalVolcano
Site Admin
Posts: 1717
Joined: Thu Jun 09, 2011 10:04 am

Re: How to replace multiple lines

Post by DigitalVolcano »

You need to stay on the "Input folder" tab and enter the *.htm in the "File Filter" box. The "input file" tab/mode is for single, named files only.

Your script has lots of spaces before each command - the batch processor doesn't like this.

Try:

Code: Select all

//TextCrawler Script File 1.0

!Find
    <meta name="msapplication-task" content="name=Sign up for a free blog;action-uri=http://signup/;icon-uri=http://s2.wp.com/i/favicon.ico" /><meta name="msapplication-task" content="name=Support;action-uri=http://support/;icon-uri=http://s2.wp.com/i/favicon.ico" /><meta name="msapplication-task" content="name= Forums;action-uri=http://forums/;icon-uri=http://s2.wp.com/i/favicon.ico" /><meta name="title" content="Posts by me |  " />
!Replace
!Options
Non-RegEx
!Comment

!End
Hope this helps!
Docfxit
Posts: 2
Joined: Tue Mar 04, 2014 3:04 pm

Re: How to replace multiple lines

Post by Docfxit »

That worked out really great. It saved me a lot of time.

Thank you very much,

Docfxit
Post Reply