How to EDIT Multiple Files

Discussion in 'HTML & Website Design' started by M5love, Jul 22, 2007.

  1. #1
    I have a few hundred HTML pages that need to be edited to insert Adsense Code. How can I go about doing that without opening every single one and inserting the 3 ad units,1 search box and 1 link unit per page. That's 160x5=800 edits! :eek: I need your help please. Thanks.
     
    M5love, Jul 22, 2007 IP
  2. Colbyt

    Colbyt Notable Member

    Messages:
    3,224
    Likes Received:
    185
    Best Answers:
    0
    Trophy Points:
    210
    #2
    A free program called multi-replace will replace any string with another in a large group of files.

    If you can identify a unique string immediately before or after where you want the adsense to go, I can see it being useful for your purpose. That string must be unique. It will replace everyone it finds. So replacing </div> or something like that would create major problem.

    More info?
     
    Colbyt, Jul 22, 2007 IP
  3. M5love

    M5love Well-Known Member

    Messages:
    1,211
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    180
    #3
    Thanks for the reply.

    I can identify a unique phrase before the adsense no problem. The thing with these editors is that they can't handle 10-20 lines of code. I want to also remove code so that would be helpful if it could delete it.
     
    M5love, Jul 22, 2007 IP