Need help appending html code to many html files.

T

Tom

Hello,

Is there a tool/program that will do this?
I need to appened to the header and footer of each html page on my
site. There are hundreds of html files. This would take forever to
do manually.

TIA!
 
K

Karl Groves

Tom said:
Hello,

Is there a tool/program that will do this?
I need to appened to the header and footer of each html page on my
site. There are hundreds of html files. This would take forever to
do manually.

TIA!

First, take a short trip to Google and look up "server side includes"
Or, if your host supports PHP, go to http://www.php.net and look up the
"include" function.

Make your header & footer files and then use your favorite web authoring
tool to do a "find & replace" on the stuff you want replaced.

-Karl
 
T

The Doormouse

Is there a tool/program that will do this?
I need to appened to the header and footer of each html page on my
site. There are hundreds of html files. This would take forever to
do manually.

GoLive can do this using a global "Find and Replace".

The Doormouse
 
M

marcus

Is there a tool/program that will do this?

Here's a batch file to do it:

@echo off
rem
rem topntail.bat
rem
md done
for %%i in (*.html) do copy top.txt+%%i+tail.txt done\%%i
 
S

Spartanicus

Here's a batch file to do it:

@echo off
rem
rem topntail.bat
rem
md done
for %%i in (*.html) do copy top.txt+%%i+tail.txt done\%%i

That would produce invalid html unless </body> and </html> are omitted
from the html file. It could also only be used once, which rather
defeats the purpose.
 
D

Disco Octopus

Tom typed:
Hello,

Is there a tool/program that will do this?
I need to appened to the header and footer of each html page on my
site. There are hundreds of html files. This would take forever to
do manually.

TIA!

best way is as other have said... use some kind of server side thing,
but should that not be an option for you, maybe this may help....
BINSUB http://www.programmersheaven.com/zone16/cat924/
I have never used it, but it looks like it is what you are talking
about.
Other wise, awk (or gawk) can do the business for you too.
 
W

William Desrochers

Tom said:
Is there a tool/program that will do this?

I like using NoteTab Light (its free), it has a search & replace with the
option to go through every page (opens each file as tabs) , i use it to go
through hundreds of pages to add things.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top