HighDots Forums  

Need help appending html code to many html files.

alt.html alt.html


Discuss Need help appending html code to many html files. in the alt.html forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Tom
 
Posts: n/a

Default Need help appending html code to many html files. - 09-06-2004 , 11:30 AM






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!

Reply With Quote
  #2  
Old   
Karl Groves
 
Posts: n/a

Default Re: Need help appending html code to many html files. - 09-06-2004 , 12:05 PM







"Tom" <tom999 (AT) ica (DOT) net> wrote

Quote:
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




Reply With Quote
  #3  
Old   
Mark Parnell
 
Posts: n/a

Default Re: Need help appending html code to many html files. - 09-06-2004 , 06:38 PM



On 6 Sep 2004 08:30:36 -0700, Tom <tom999 (AT) ica (DOT) net> declared in alt.html:

Quote:
Hello,
G'day.

Quote:
I need to appened to the header and footer of each html page on my
site.
http://www.allmyfaqs.com/faq.pl?Incl...ile_in_another

--
Mark Parnell
http://www.clarkecomputers.com.au
"Never drink rum&coke whilst reading usenet" - rf 2004


Reply With Quote
  #4  
Old   
The Doormouse
 
Posts: n/a

Default Re: Need help appending html code to many html files. - 09-06-2004 , 07:49 PM



tom999 (AT) ica (DOT) net (Tom) wrote:

Quote:
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

--
The Doormouse cannot be reached by e-mail without her permission.


Reply With Quote
  #5  
Old   
marcus@myrealbox.com
 
Posts: n/a

Default Re: Need help appending html code to many html files. - 09-06-2004 , 09:28 PM




On 6 Sep 2004 08:30:36 -0700, tom999 (AT) ica (DOT) net (Tom) wrote:

Quote:
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






Reply With Quote
  #6  
Old   
Spartanicus
 
Posts: n/a

Default Re: Need help appending html code to many html files. - 09-07-2004 , 03:16 AM



marcus (AT) myrealbox (DOT) com wrote:

Quote:
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
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.

--
Spartanicus


Reply With Quote
  #7  
Old   
Disco Octopus
 
Posts: n/a

Default Re: Need help appending html code to many html files. - 09-07-2004 , 07:10 AM



Tom typed:
Quote:
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.




Reply With Quote
  #8  
Old   
William Desrochers
 
Posts: n/a

Default Re: Need help appending html code to many html files. - 09-08-2004 , 07:55 PM



"Tom" <tom999 (AT) ica (DOT) net> wrote

Quote:
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.




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.