Forum Moderators: open

Message Too Old, No Replies

Batch editing HTML pages

         

eaglepi

2:15 pm on Dec 26, 2005 (gmt 0)

10+ Year Member



I have a website that contains 223 html pages, I have just changed servers and I need to change every page with the old server address to my new server address.

I know I can open each of the 223 pages and manually edit them by using replace but I am hoping that there is some kind of program or utility that does batch edits to html's?

Does anyone know of a such thing?

If anyone knows of a easier way to edit all my pages besides doing them manully please give me your suggestions.

Thank you in advance

jbinbpt

2:28 pm on Dec 26, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



HTML-kit has a plugin to do this
[chami.com...]

coopersita

4:18 pm on Dec 26, 2005 (gmt 0)

10+ Year Member



Do you have mac or pc?

For mac textwrangler.

rocknbil

5:57 pm on Dec 26, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Macromedia Homesite will rip through several hundred pages on a R & R in a matter of seconds and can traverse directories, etc. But then ya' have to upload them all.

If you're any god at server-side programming you can write a perl, php, or other script to do it for you right on the server.

DrDoc

2:54 am on Dec 27, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



... in which case you should go ahead and set this as a variable, which then populates on every page.

topsites

3:59 am on Dec 27, 2005 (gmt 0)



I use a syntax-based color text code editor which has a global search-replace function. I simply open ALL the pages I wish to change, then Find-Replace and select All Open Documents. Once Confirm is clicked, it will likely do 223 pages in under 60 seconds, then Save All takes another minute, you should be done in under 5 BUT you do need to check and make sure it replaced the code in ALL the pages, just in case sometimes the code isn't as universal as you first thought, but eventually it will be.

To double-check, on CuteHTML the changed files are red while unchanged would be black names, so just scroll through the names before you Save ALL to see if you spot a black name (they stand out). On EP2, unfortunately I forgot how it is done but the process is very similar.

Try either CuteHtml or EditPlus2

eaglepi

6:19 am on Dec 27, 2005 (gmt 0)

10+ Year Member



Thank you to all who answered, Since I still have both servers active I am just going to leave it as it is for now. I won't need the pages after this week so I can make do with the 2 servers for now.