Need help appending html code to many html files.

Discussion in 'HTML' started by Tom, Sep 6, 2004.

  1. Tom

    Tom Guest

    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!
     
    Tom, Sep 6, 2004
    #1
    1. Advertising

  2. Tom

    Karl Groves Guest

    "Tom" <> wrote in message
    news:...
    > 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
     
    Karl Groves, Sep 6, 2004
    #2
    1. Advertising

  3. Tom

    Mark Parnell Guest

    Mark Parnell, Sep 6, 2004
    #3
  4. (Tom) wrote:

    > 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.
     
    The Doormouse, Sep 7, 2004
    #4
  5. Tom

    Guest

    On 6 Sep 2004 08:30:36 -0700, (Tom) wrote:

    >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
     
    , Sep 7, 2004
    #5
  6. Tom

    Spartanicus Guest

    wrote:

    >>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
     
    Spartanicus, Sep 7, 2004
    #6
  7. 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.
     
    Disco Octopus, Sep 7, 2004
    #7
  8. "Tom" <> wrote in message
    news:...
    > 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.
     
    William Desrochers, Sep 9, 2004
    #8
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. dee
    Replies:
    2
    Views:
    418
  2. John [H2O]
    Replies:
    2
    Views:
    299
    alex23
    Sep 22, 2008
  3. Paul Danese
    Replies:
    1
    Views:
    140
    Stefano Crocco
    Jun 14, 2007
  4. Steve

    newbie; appending multiple files

    Steve, May 6, 2004, in forum: Perl Misc
    Replies:
    5
    Views:
    165
    David K. Wall
    May 7, 2004
  5. Luke
    Replies:
    8
    Views:
    185
Loading...

Share This Page