Mass Code "Find and Replace" for Hundreds of HTML Pages??

Discussion in 'HTML & Website Design' started by jawinn, May 31, 2006.

  1. #1
    I'm trying to change adsense channels on one of my larger sites and I've got a little problem, I don't want to have to do this manually. Is there a way, via a tool or script I can use, to find and replace HTML code on hundreds of pages at once?
     
    jawinn, May 31, 2006 IP
  2. Jdog

    Jdog Peon

    Messages:
    267
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Dreamweaver works pretty well for this, but an uploaded script would be easier.
     
    Jdog, May 31, 2006 IP
  3. infin8

    infin8 Peon

    Messages:
    42
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    If the files are on your local machine, you can use Dreamweaver or Textpad to do it. If they're on your web server, you could write a custom script and run it via SSH.
     
    infin8, May 31, 2006 IP
  4. jawinn

    jawinn Active Member

    Messages:
    1,024
    Likes Received:
    32
    Best Answers:
    0
    Trophy Points:
    88
    #4
    I have them on my PC. So you guys are saying that there is a feature in DM that will comb through a bunch of HTML files, at once and find and replace code?
     
    jawinn, May 31, 2006 IP
  5. mjewel

    mjewel Prominent Member

    Messages:
    6,693
    Likes Received:
    514
    Best Answers:
    0
    Trophy Points:
    360
    #5
    Yes, Dreamweaver will find and replace by page, folder, or entire site.
     
    mjewel, May 31, 2006 IP
  6. humm

    humm बहादुर बच्चा

    Messages:
    4,346
    Likes Received:
    850
    Best Answers:
    0
    Trophy Points:
    310
    #6
    if you are using a blog, there is a plugin available.
     
    humm, May 31, 2006 IP
  7. infin8

    infin8 Peon

    Messages:
    42
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Yeah, Dreamweaver has a very good find and replace function. You can download a free 30 day trial from Macromedia. Then you have to set up your site when you run the program, but you might need to check the help files on how to do that. It's a little tricky at first, but it's well worth the time taken to learn.
     
    infin8, May 31, 2006 IP
  8. jackburton2006

    jackburton2006 Peon

    Messages:
    5,296
    Likes Received:
    282
    Best Answers:
    0
    Trophy Points:
    0
    #8
    I used to just use BK Replace'em. Works pretty well and it's free.

    http://www.freewarefiles.com/programs.php?categoryid=9&subcategoryid=103&ProgramID=262
     
    jackburton2006, May 31, 2006 IP
  9. Corey Bryant

    Corey Bryant Texan at Heart

    Messages:
    1,126
    Likes Received:
    51
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Dreamweaver and Frontpage have this capability. UltraEdit does as well. If you dont have either, NVU probably has this feature as well since it is quite convenient at times
     
    Corey Bryant, May 31, 2006 IP
  10. saadahmed007

    saadahmed007 Admínistratör

    Messages:
    5,272
    Likes Received:
    869
    Best Answers:
    0
    Trophy Points:
    380
    #10
    I would recommend you Dreamwaver if you have a simply html or php site if you have dynamic then script would be better!
     
    saadahmed007, May 31, 2006 IP
  11. jawinn

    jawinn Active Member

    Messages:
    1,024
    Likes Received:
    32
    Best Answers:
    0
    Trophy Points:
    88
    #11
    You guys are awesome, thanks! I own a copy of DM and use it to edit my sites. Where is the command that does a find and replace for entire site or what is it called?

    BTW this is a straight HTML site not a blog.
     
    jawinn, May 31, 2006 IP
  12. mjewel

    mjewel Prominent Member

    Messages:
    6,693
    Likes Received:
    514
    Best Answers:
    0
    Trophy Points:
    360
    #12
    Under "Edit" - "Find and replace" or just use the shortcut "Ctrl+f"
     
    mjewel, May 31, 2006 IP
    jawinn likes this.
  13. Jdog

    Jdog Peon

    Messages:
    267
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #13
    Tip: Make sure you are only replacing what you want to replace. I used this one time on a site and completely screwed it up! Right when google was starting to find it.

    Wow, post 100.
     
    Jdog, May 31, 2006 IP
  14. jawinn

    jawinn Active Member

    Messages:
    1,024
    Likes Received:
    32
    Best Answers:
    0
    Trophy Points:
    88
    #14
    Ok, I found this. It works great thanks for everyone's help.
     
    jawinn, Jun 1, 2006 IP
  15. brian394

    brian394 Well-Known Member

    Messages:
    226
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    108
    #15
    I personally don't use Dreamweaver myself, but whenever I need to do a mass find & replace across many files I just use a tool called PowerGREP. Seems to work well and supports regular expressions too. It's made by the same people who make EditPad.
     
    brian394, Jun 1, 2006 IP