Automator/AppleScript for adding code to an html file

Hi all,
I have a bunch of files (60+) that have been converted from xml to html so that they can be read by the calibre eBook software. Because they were originally .xml files, they do not have opening or closing htiml or body tags. They won't open in Word, only textedit. I am looking for a way to insert the <html> <body> and </body> </html> codes into each file as quickly/painlessly as possible, ideally as a workflow, or series of workflows, that I could use later with other files of this type.
Can anyone advise me on how to do this? I'm new at coding/applescript/automator, but I'm generally a quick study.

This is an applescript version which should be a little more comprehensible.
-- select files - might be easier ways to do this depending on your setup
set fileList to choose file with prompt "Choose files to wrap in HTML tags" with multiple selections allowed
-- loop through files
repeat with thisFile in fileList
  -- open the file for writing
          set fp to open for access thisFile with write permission
  -- grab contents of file and wrap it in tags
          set unmodifiedText to read fp
          set modifiedText to "<html>" & return & "<body>" & return & unmodifiedText & return & "</body>" & return & "</html>"
  -- write the new text out to the file and close it.
          set eof of fp to 0
          write modifiedText to fp
          close access fp
end repeat

Similar Messages

  • Help Needed: Automator Applescript for Folder Action - Encode Video

    Hi !
    I have created an Automator Applescript for a Folder Action to do the following:
    When a new video file is moved to the target folder (i.e. Download of Vuze is done), automatically launch the Applescript Action that does the followin g(Applescripted):
    1) Using "run shell script" and FFMPEG on a UNIX command line, determine Width/Height, Framerate, Bitrate
    2) Calculate encoding parameters (slightly reduced bitrate, reduced Aspect etc.)
    3) Using "run shell script" with ffmpeg on the command line and the calculated parameters to encode the video file
    At the same time, the action is written to a log file so I know if a file is recognized, when encoding started etc.
    It works fine if I save this Action as an .app, make an alias on the Desktop and drop video files on it.
    It also works fine if I attach the script to a folder as a folder action and drag a video file in there.
    However, when I attach the script as a folder action to the Vuze download folder, it encodes only some video files, i.e. if there was a download of 5 files, chances are good that it will not encode 1 or 2 files out of those 5.
    If for example a second download finishes while the encoding for the first download is still going on, sometimes the second file starts encoding after the first encode finishes, sometimes it does not, the file does not make the log file at all, i.e. the folder action missed it or the automator action dropped it because it was still encoding. Still, sometimes it happens, sometimes not.
    As I need a solution that is 100% accurate, I would like to ask if there are any ideas on how to do this better maybe? As I am not an Applescript Guru, I would need some help to know what works and what doesn't and what the syntax is.
    My main idea right now:
    Similar to how ffmpegX works with its "process" application, have a second script (as .app) that receives the files to be encoded from the automator action and puts them in a queue, then proceeds to encode this queue while the main automator action is free to receive the next file.
    Writing this second app is quite straightforward (a modified version of my current script) but I have some questions I need help with:
    1) How do I call another applescript from within an existing applescript that launches the new applescript in a new process?
    2) How do I pass parameters to this new applescript?
    3) In case of this "Queueing" Idea, once I called the external applescript the first time, how do I make sure when I call next time, that I don't open a second instance of this script but rather pass another queue item to the original instance to be processed?
    Or in general: Is there a better way to achieve this automatic encoding solution that I have not thought about?
    Alternatively:
    Does anyone know how to call the "process" application that comes with the ffmpegX package with the correct parameters to use as a queueing / processing tool?
    Thanks!
    Joe
    Message was edited by: Joe15000
    Message was edited by: Joe15000

    To do this, I created an Automator workflow with an Applescript snippet to change the 'media kind'.
    Here is the 'Run Applescript' workflow step code:
    on run {input, parameters}
              tell application "iTunes"
                        set video kind of (item 1 of input) to movie
              end tell
              return input
    end run
    Prior to this running, I have an 'Import Files into iTunes' workflow step.
    You can switch out 'movie' with: 'TV show', 'music video', or anything in ITLibMediaItemMediaKind.
    Good luck,
    Glenn

  • Automator/Applescript for Pages

    Does anyone know of a good reference for Automator Actions or Applescripts for Pages? I've looked at all the usual websites and no one has any. All I'm trying to do is use a script to automate the process of opening Word docs and save them as Pages files.

    I do not think there is anything really well written and exhaustive on the matter. I have three main sources:
    1. Pages script dictionary (available in ScriptEditor through Open Dictionary > Pages).
    2. This page with a script that goes the opposite way: http://pagesfaq.blogspot.com/2006/11/i-have-one-thousand-pages-documents-to.html
    3. Searching Google for the string "tell application Pages".

  • How to make ads/banners published for an Adserver (only an HTML file with all js files and images linked)

    Hi everyone!
    I'm hoping someone can solve this.
    I have made some ads in Edge Animate CC and need to put them on an Adserver....
    but the adserver company only accept the HTML code... only extra files or images.
    This means linking the images and the .js files to URLs. I have done it with the images but are hitting a wall with the _edge.js
    I added the script in the HTML to load the _edge.js. (<script src="http://www.christianlaursen.net/ADS/WL_AD_160x600_edge.js"></script>)
    But I get certain errors in the console which I believe relates to how Edge tries to load _edge.js locally (even if i load it separately)
    Uncaught ReferenceError: AdobeEdge is not defined                    WL_AD_160x600_edge.js:3
    Failed to load resource: net::ERR_FILE_NOT_FOUND                 file:///C:/Users/claursen/Desktop/WL_AD_160x600_edge.js
    Uncaught TypeError: Cannot read property 'stage' of undefined    edge.5.0.1.min.js:133
    Uncaught TypeError: Cannot read property 'stage' of undefined    edge.5.0.1.min.js:126
    This is as far as I got. I am not sure 100% the script is being loaded correctly, but as the console is complaining about the local file, I have
    a feeling it's with Edge's attempt to load it locally that causing it to stop.
    Anyone doing Ads with Edge? It seems it should be such a simple thing and also important thing
    Thanks in advance for reading and any given help!

    I have verified that an Edge published banner can be booked into DFP (Doubleclick for Publishers) as a third party tag by creating an iFrame of the link to your edge published HTML file. You save that file as a *.txt.There is still the issue of click URL macros, and cachebusters. For DFP the click URL macro is %%CLICK_URL_ESC%%
    So you would probably use in Edge
    window.open('cta', %%CLICK_URL_ESC%%'http://somedomain.com/');
    then for the cachebuster, DFP's is random=%%CACHEBUSTER%%
    This is what an Edge published banner tag would look like.
    <style type="text/css">
    body{
    margin: 0;
    padding: 0;
    </style>
    <iframe src="http://www.somedomain.com/yourfilename.html"
    marginwidth="0" marginheight="0" scrolling="no" width="160" align="top"
    frameborder="0" height="600"></iframe>
    IMO it is worth pursuing using Google Analytics for the reporting, as you can put your Google Analytics code in your Edge published HTML file.Hopefully someine with GA experience will chime in.
    Event Tracking in Google Analytics Universal through Google Tag Manager - YouTube

  • *Added* code to existing source file, compiled it, and class file shrunk

    Another newbie here. Fortunately, my classpath is ok, so I'm able to compile a .java file.
    I added one line of code (System.out.println) to write the value of a variable to a log. After compiling with javac, I noticed that the resulting [new] class file was smaller than the existing class file. I looked at each of the class files with Textpad. It's gibberish, but I quickly saw that a large block of code was missing in the new class file, even though the size of the source file had been increased.
    There is a difference, however, between how the two class files were created. The existing class file was compiled (along with many others) by exporting an .EAR file from a development environment (WSAD) to the WebSphere Administrator Console. Conversely, I am now compiling the same source file with javac on my machine.
    I suspect that this is the reason why I can add code to a .java file, compile it, and have the resulting class file actually lose code. Even if I am correct, I don't know what to do about it.
    Does anyone have an idea?
    Regards,
    Daniel T.

    Thank you both for your replies. I've read many posts over the past few months, and I know how important it is to provide as much info as possible, when asking a question here. That said, I have another tasty tidbit...
    After replacing the existing (larger) class file with the new (smaller) class file, my application now produces this:
    "*Error 500: LinkageError while defining class*..." [name of class]
    *"...(Unsupported major.minor version 50.0) This is often caused by having a class defined at multiple locations within the classloader hierarchy. Other potential causes include compiling against an older or newer version of the class that has an incompatible method signature. Dumping the current context classloader hierarchy: ==> indicates defining classloader ==>[0] com.ibm.ws.classloader.CompoundClassLoader@6bd156d5 Local ClassPath:"*
    ...[the entire classpath]...
    Original exception--- java.lang.UnsupportedClassVersionError:
    I'm guessing that my focus should mostly be on the 'Original exception', and maybe I need to revisit the JRE or JDK or JVM (these terms are somewhat nebulous to me, so please forgive me using them interchangeably) on my machine. For now, I'll just keep trying stuff. Thanks again for the replies!
    Regards,
    Daniel T.

  • How do I export bookmarks from Firefox for Mobile (android) to an html file?

    I have bookmarks on my Firefox for Mobile v 33.1 that I would like to copy/back up to an html file. Even if I access the desktop version on my tablet I don't see the Show all Bookmarks - Import/Export option. This Android profile used to be linked through the old Firefox Sync to my PC but the issue is that I can't access it from my PC anymore as I just had to replace the hard disk. I have now installed the new Firefox on my PC but it won't sync with the old Android version as the new Firefox Sync is not compatible with the old one. Also when I go under Sync on the Android, it says the email account is deprecated.
    Going forward I understand I need to remove account on the Android, update to the new Firefox Sync and newly link PC and Android device. However I have read that If I remove the account on my Android Firefox and set up the new Firefox Sync on it, I will lose my old bookmarks and it will only start saving and syncing bookmarks from then on even if I use the same email address to set it up. If this is the case and before taking this step, is there a way I can copy my old Android bookmarks to an html file?
    All suggestions very much appreciated! I'm completely lost.
    Thanks

    Tangram that is an answer for desktop Firefox. It does not apply to Firefox for Android.
    There is no way to export bookmarks/history in Firefox for Android.
    However your Firefox sync account is unrelated to the Firefox for Android profile. You can safely remove the account without loss of data. Then set up a new Sync Account.

  • Use PHP code coloring in HTML files

    In Dreamweaver CS3, what changes do I need to make to get PHP
    code coloring show up in .html files?

    robot88888888,
    First, copy this file from the app config folder:
    C:\Program Files\Adobe\Adobe Dreamweaver
    CS3\configuration\CodeColoring\PHP.xml
    To the user config folder:
    C:\Documents and Settings\[username]\Application
    Data\Adobe\Dreamweaver
    9\Configuration\CodeColoring\
    Then open PHP.xml in your favorite editor. You need to add
    HTML to all
    of the doctype lists Change every occurrence of this:
    doctypes="PHP_MySQL"
    to be:
    doctypes="PHP_MySQL,HTML"
    Save and close. If DW is running, close it. Now restart DW.
    HTH,
    Randy
    > In Dreamweaver CS3, what changes do I need to make to
    get PHP code coloring show up in .html files?

  • Standards for storing the Javadoc generated html files?

    I'm new to using Javadoc have the following questions:
    1) Does anyone know of any standards as to what directory structure should be used to store the Javadoc generated html files?
    2) When working with a development and production environment, where should they be stored? Only on the development server or on both?
    3) When setting up a html page to link to all of the various Javadoc generated files for all of our applications, should we just manually create an html page that links to them or is there a tool that will take care of this?
    Any information that can be provided will be a big help!

    1) All you do is specify a directory with the -d option and Javadoc creates the directory structure below that. We often use either "-d docs" or "-d html" to create a directory named "docs" or "html" in the current directory.
    2) Preferably they should be stored on a server that has a web server running so people can access them. We build the docs nightly on the development server where people can access the latest version using a file: URL (not with a web server). Then before each release we stage them on our intranet before we push them out to the intranet. We also run the DocCheck doclet and a link checker nightly so developers and writers can find errors in their documentation.
    3) If you want a top-level page that links to separate javadoc documents, you need to do this manually. However, keep in mind that you can also inter-link all those separate documents by using the -link or -linkoffline option.
    Let us know if you have more questions or comments.
    -Doug Kramer
    Javadoc team

  • How to save html code  into a html file in webdynpro

    Hello Everyone!
    I want create a html page in WebDynpro,
    example :
    String mystr = "<html><head><titile>This is a text</title></head><body> this is body</body></html>";
    I want create a html page and save this to the *.html page , how can i to do ?
    thanks!

    HI! sowmya&Satya
    1st:
    I use method (File>new>file.) create a html under my project . but when I swith web dynpro perspective,  can't found the html file under my current project ?
    2nd:
      public void onActionInputToHtml(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionInputToHtml(ServerEvent)
        String mystr = "<html>.............</html>"
        //@@end
    how to input "mystr" to the html page which I have create in 1st step ?
    3rd :
    how to display the html page In IE when run my project program ?
    Thanks!

  • Including  a servlet code within an html file

    I have an html file which should include the contents of a servlet. The html and
    servlet are reside on different webservers, otherwise I would have used JSP.
    I cant use JSP here. hope u will provide me a solution as soon as possible

    The best way of doing this would be to make the html page a jsp and use the jstl c:import tage.
    If it must be an html you could use the IFrame tabe:
    <html>
    <head>
    </head>
    <body>
    <IFRAME SRC="http://www.yahoo.com" WIDTH="800" HEIGHT="600" scrolling="auto" frameborder="0"></IFRAME>
    </body>
    </html>

  • I am trying to export "bookmarks.html" for another browser but No HTML file is created! How can I fix this?

    Bookmarks> Organize bookmarks> ★ Export HTML > "export bookmarks file" window appears. Save as "Bookmarks.HTML" Desktop> NO FILE IS PRODUCED!

    Does Firefox create an HTML file (bookmarks.html in the profile folder) on exit if you set the pref [http://kb.mozillazine.org/browser.bookmarks.autoExportHTML browser.bookmarks.autoExportHTML] to true on the about:config page ?
    See also http://kb.mozillazine.org/Export_bookmarks

  • Applescript for selecting an image in PDF file.

    Hi All,
    I'm looking for a apple or java script for selecting an image in PDF file. Can anyone help?

    Selecting an image? For what purpose?

  • Learning Unix commands (and automator/applescript) for a dummy :-)

    Hi:
    I've been supporting macs for many years and have done mostly user end support with all the various GUI tools. I've never been a programmer, never had the mind for it, etc.
    However, I've now reached the point where I need to do some kind of scripting and I'm looking for some good learning/training tools. I was wondering if anyone might have suggestions about the best training / reference guides to go about doing this. Right now, it's as if I need to play a little Beethoven, haven't learned Chopsticks yet and I'm trying to find out how to play chopsticks while learning a little Beethoven at the same time. (how's that for a metaphor?)
    For example: For my first project, I have to set up a backup for some laptop users so that certain files will be backed up. The need is different for each user, so this is why setting up a script would be easiest. My goals in the setting up this project are:
    - Make the script run at logout (logout hook)
    - check to make sure the network volume I want to backup to is present; if not present, stop the script
    - Use either cp or rsync to copy the files/directories to the shared volume.
    I've tried to look around the internet for help, examples, etc, but I've been unable to put together exactly the commands I need to sue to accomplish my task.
    Any suggestions would be great.
    Thanks!

    If you already know something about unix commands, there is a scripting tutorial at http://www.tldp.org/LDP/abs/html/index.html
    If you need a tutorial on unix commands, http://osxfaq.com/Tutorials/LearningCenter/UnixTutorials/LoseTheMouse/index.ws had a pretty good tutorial, although at the moment, that link isn't loading for me now so I don't know if it is still up online or not.
    for creating logout hooks, http://www.bombich.com/mactips/loginhooks.html might help.
    Also, in Terminal, type man launchd.plist if you can think of a scenario where you could implement a "cron-like" solution. Then refer to Apple's own periodic daily/weekly/monthly launchd plists (com.apple.periodic-*ly.plist) at/System/Library/LaunchDaemons/. There are more triggers available than just day/date/time, such as "watchPaths" and "RunAtLoad." Home grown launchd plists ones should go in /Library/LaunchDaemons/ or Library/LaunchAgents, not /System/Library/LaunchDaemons/. Also man launchd (no ".plist").

  • How i can use ExportPDF in java code to get html files as PDF?

    I need to use ExportPDF in java code to export my html to PDF and save that in my local system.

    Yes, it's not a service for automating. Automating Acrobat is a possibility (though awkward), or there are server products.

  • Performing a Find/Replace for an entire Folder of html files

    Hello,
    I have been working away on adding an include to my html pages and getting the code all set up for a header and footer. With lots of help from kind people on this forum I finally have it working!
    Now I want to add this to an entire folder of 500 or so HTML pages.
    Can someone walk me through how to do this?
    I also want to eliminate some stupid code that I put in years ago to prevent right clicking.
    Perhaps this is a multi step job? First get rid of old code. Then add new header. Then add new footer???
    Here is the fully functioning page with the new code:
    http://www.glennbartley.com/naturephotography/birds/ACORN%20WOODPECKER.html
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <title>ACORN WOODPECKER</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </head>
    <body bgcolor="#000000" text="#CCCCCC" link="#CCCCCC" vlink="#CCCCCC" alink="#999999">
    <div align="center">
    <?php $filepath = $_SERVER['DOCUMENT_ROOT'] . '/naturephotography/Header-Test.html'; include($filepath); ?>
    </div>
    <h1 align="center"><strong><font color="#999999" size="5" face="Arial Narrow">ACORN WOODPECKER</font></strong></h1>
    <p align="center"><font color="#009900" face="Arial, Helvetica, sans-serif"><strong>NORTH AMERICA</strong></font></p>
    <p align="center"><img src="../GB Collection/Acorn Woodpecker - 01.jpg" alt="Acorn Woodpecker" width="530" height="775"> </p>
    <p align="center"><img src="../GB Collection/Acorn Woodpecker - 02.jpg" alt="Acorn Woodpecker" width="530" height="775"></p>
    <p align="center"><img src="../GB Collection/Acorn Woodpecker - 03.jpg" alt="Acorn Woodpecker" width="530" height="775"></p>
    <p align="center"><img src="../GB Collection/Acorn Woodpecker - 04.jpg" alt="Acorn Woodpecker" width="530" height="775"></p>
    <p align="center"><img src="../GB Collection/Acorn Woodpecker - 05.jpg" alt="Acorn Woodpecker" width="530" height="775"></p>
    <p align="center"><img src="../GB Collection/Acorn Woodpecker - 06.jpg" alt="Acorn Woodpecker" width="775" height="530"></p>
    <p align="center"><img src="../GB Collection/Acorn Woodpecker - 07.jpg" alt="Acorn Woodpecker" width="530" height="775"></p>
    <p align="center"><img src="../GB Collection/Acorn Woodpecker - 08.jpg" alt="Acorn Woodpecker" width="530" height="775"></p>
    <div align="center"><?php $filepath = $_SERVER['DOCUMENT_ROOT'] . '/naturephotography/Footer-Test.html'; include($filepath); ?>
    </div>
    </body>
    </html>
    And an example of one of the existing pages:
    http://www.glennbartley.com/naturephotography/birds/COMMON%20LOON.html
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <!-- prevent right-click -->
    <SCRIPT LANGUAGE='JavaScript' type='text/javascript' >
    <!--
    document.oncontextmenu = function(){return false}
    if(document.layers) {
    window.captureEvents(Event.MOUSEDOWN);
    window.onmousedown = function(e){
    if(e.target==document)return false;
    else {
    document.onmousedown = function(){return false}
    //-->
    </SCRIPT>
    <title>COMMON LOON</title>
    <meta name="description" content="Photographs of Common Loon in Ontario. Nature Wildlife and Landscape Photography. Bird Photography">
    <meta name="keywords" content="Loon, Common Loon, bird photography, birds of Ontario, nature photography">
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <script language="JavaScript" type="text/JavaScript">
    <!--
    function MM_preloadImages() { //v3.0
      var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
        var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
        if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
    //-->
    </script>
    </head>
    <body bgcolor="#000000" text="#CCCCCC" link="#CCCCCC" vlink="#CCCCCC" alink="#999999">
    <h1 align="center"><font color="#999999" size="5" face="Arial Narrow"><strong>COMMON
      LOON</strong></font></h1>
    <p align="center"><img src="../GB Collection/_Update - Aug 24, 2011/Common Loon - 19.jpg" width="775" height="530"></p>
    <p align="center"><img src="../GB Collection/_Update - Aug 24, 2011/Common Loon - 20.jpg" width="775" height="530"></p>
    <p align="center"><img src="../GB Collection/_Update - Aug 24, 2011/Common Loon - 21.jpg" width="530" height="775"></p>
    <p align="center"><img src="../GB Collection/_Update - Aug 24, 2011/Common Loon - 22.jpg" width="775" height="530"></p>
    <p align="center"><img src="../GB Collection/_Update - Aug 24, 2011/Common Loon - 23.jpg" width="775" height="530"></p>
    <p align="center"><img src="../GB Collection/_Update - Aug 24, 2011/Common Loon - 24.jpg" width="775" height="530"></p>
    <p align="center"><img src="../GB Collection/UPDATE - NOV 2012/NORTH AMERICA/Common Loon - 53.jpg" width="775" height="530"></p>
    <p align="center"><img src="../GB Collection/UPDATE - NOV 2012/NORTH AMERICA/Common Loon - 54.jpg" width="775" height="530"></p>
    <p align="center"><img src="../GB Collection/UPDATE - NOV 2012/NORTH AMERICA/Common Loon - 55.jpg" width="775" height="530"></p>
    <p align="center"><img src="../GB Collection/UPDATE - NOV 2012/NORTH AMERICA/Common Loon - 56.jpg" width="775" height="530"></p>
    <p align="center"><img src="../GB Collection/UPDATE - NOV 2012/NORTH AMERICA/Common Loon - 57.jpg" width="775" height="530"></p>
    <p align="center"><img src="../GB Collection/UPDATE - NOV 2012/NORTH AMERICA/Common Loon - 58.jpg" width="775" height="530"></p>
    <p align="center"><img src="../GB Collection/_Update - Aug 24, 2011/Common Loon - 25.jpg" width="530" height="775"></p>
    <p align="center"><img src="../GB Collection/_Update - Aug 24, 2011/Common Loon - 26.jpg" width="775" height="530"></p>
    <p align="center"><img src="../GB Collection/_Update - Aug 24, 2011/Common Loon - 27.jpg" width="775" height="530"></p>
    <p align="center"><img src="../GB Collection/_Update - Aug 24, 2011/Common Loon - 28.jpg" width="775" height="530"></p>
    <p align="center"><img src="../GB Collection/_Update - Aug 24, 2011/Common Loon - 29.jpg" width="775" height="530"></p>
    <p align="center"><img src="../GB Collection/_Update - Aug 24, 2011/Common Loon - 30.jpg" width="530" height="775"></p>
    <p align="center"><img src="../GB Collection/_Update - Aug 24, 2011/Common Loon - 31.jpg" width="775" height="530"></p>
    <p align="center"><img src="../GB Collection/_Update - Aug 24, 2011/Common Loon - 32.jpg" width="775" height="530"></p>
    <p align="center"><img src="../GB Collection/_Update - Aug 24, 2011/Common Loon - 33.jpg" width="775" height="530"></p>
    <p align="center"><img src="../GB Collection/_Update - Aug 24, 2011/Common Loon - 34.jpg" width="775" height="530"></p>
    <p align="center"><img src="../GB Collection/_Update - Aug 24, 2011/Common Loon - 35.jpg" width="775" height="530"></p>
    <p align="center"><img src="../GB Collection/_Update - Aug 24, 2011/Common Loon - 36.jpg" width="775" height="530"></p>
    <p align="center"><img src="../GB Collection/_Update - Aug 24, 2011/Common Loon - 37.jpg" width="775" height="530"></p>
    <p align="center"><img src="../GB Collection/_Update - Aug 24, 2011/Common Loon - 38.jpg" width="775" height="530"></p>
    <p align="center"><img src="../GB Collection/_Update - Aug 24, 2011/Common Loon - 39.jpg" width="530" height="775"></p>
    <p align="center"><img src="../GB Collection/_Update - Aug 24, 2011/Common Loon - 40.jpg" width="775" height="530"></p>
    <p align="center"><img src="../GB Collection/_Update - Aug 24, 2011/Common Loon - 41.jpg" width="775" height="530"></p>
    <p align="center"><img src="../GB Collection/_Update - Aug 24, 2011/Common Loon - 42.jpg" width="775" height="530"></p>
    <p align="center"><img src="../GB Collection/_Update - Aug 24, 2011/Common Loon - 43.jpg" width="775" height="530"></p>
    <p align="center"><img src="../GB Collection/_Update - Aug 24, 2011/Common Loon - 44.jpg" width="775" height="530"></p>
    <p align="center"><img src="../GB Collection/_Update - Aug 24, 2011/Common Loon - 45.jpg" width="775" height="530"></p>
    <p align="center"><img src="../GB Collection/_Update - Aug 24, 2011/Common Loon - 46.jpg" width="530" height="775"></p>
    <p align="center"><img src="../GB Collection/_Update - Aug 24, 2011/Common Loon - 47.jpg" width="775" height="530"></p>
    <p align="center"><img src="../GB Collection/_Update - Aug 24, 2011/Common Loon - 48.jpg" width="775" height="530"></p>
    <p align="center"><img src="../GB Collection/_Update - Aug 24, 2011/Common Loon - 49.jpg" width="775" height="530"></p>
    <p align="center"><img src="../GB Collection/_Update - Aug 24, 2011/Common Loon - 50.jpg" width="775" height="530"></p>
    <p align="center"><img src="../GB Collection/_Update - Aug 24, 2011/Common Loon - 51.jpg" width="775" height="530"></p>
    <p align="center"><img src="../GB Collection/_Update - Aug 24, 2011/Common Loon - 52.jpg" width="775" height="530"></p>
    <p align="center"><img src="../GB Collection/Common Loon - 01.jpg" width="775" height="530"></p>
    <p align="center"><img src="../GB Collection/Common Loon - 14.jpg" width="775" height="530"></p>
    <p align="center"><img src="../GB Collection/Common Loon - 11.jpg" width="775" height="530"></p>
    <p align="center"><img src="../GB Collection/Common Loon - 02.jpg" width="775" height="530"></p>
    <p align="center"><img src="../GB Collection/Common Loon - 03.jpg" width="775" height="530"></p>
    <p align="center"><img src="../GB Collection/Common Loon - 04.jpg" width="775" height="530"></p>
    <p align="center"><img src="../GB Collection/Common Loon - 05.jpg" width="1010" height="530"></p>
    <p align="center"><img src="../GB Collection/Common Loon - 06.jpg" width="775" height="530"></p>
    <p align="center"><img src="../GB Collection/Common Loon - 07.jpg" width="775" height="530"></p>
    <p align="center"><img src="../GB Collection/Common Loon - 08.jpg" width="775" height="530"></p>
    <p align="center"><img src="../GB Collection/Common Loon - 09.jpg" width="775" height="530"></p>
    <p align="center"><img src="../GB Collection/Common Loon - 10.jpg" width="775" height="530"></p>
    <p align="center"><img src="../GB Collection/Common Loon - 12.jpg" width="775" height="530"></p>
    <p align="center"><img src="../GB Collection/Common Loon - 13.jpg" width="775" height="530"></p>
    <p align="center"><img src="../GB Collection/Common Loon - 15.jpg" width="775" height="530"></p>
    </body>
    </html>

    Hello,
    Thank you for the info. I did as you described and it worked like a charm.
    I have removed the old code and added in teh header.
    I'm kind of stumped as to how to put in the footer though as there isnt really anything to "find"?
    How can I replace something at the very end of the document??
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <title>AMERICAN AVOCET</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </head>
    <body bgcolor="#000000" text="#CCCCCC" link="#CCCCCC" vlink="#CCCCCC" alink="#999999">
    <div align="center">
    <?php $filepath = $_SERVER['DOCUMENT_ROOT'] . '/naturephotography/Header-Test.html'; include($filepath); ?>
    </div>
    <h1 align="center"><font color="#999999" size="5" face="Arial Narrow"><strong>AMERICAN
      AVOCET</strong></font></h1>
    <p align="center"><img src="../GB Collection/American Avocet - 21.jpg" alt="American Avocet Image" width="775" height="530"></p>
    <p align="center"><img src="../GB Collection/American Avocet - 22.jpg" alt="American Avocet Image" width="775" height="530"></p>
    <p align="center"><img src="../GB Collection/American Avocet - 23.jpg" alt="American Avocet Image" width="775" height="530"></p>
    <p align="center"><img src="../GB Collection/American Avocet - 18.jpg" alt="American Avocet Image" width="775" height="530"></p>
    <p align="center"><img src="../GB Collection/American Avocet - 19.jpg" alt="American Avocet Image" width="775" height="530"></p>
    <p align="center"><img src="../GB Collection/American Avocet - 20.jpg" alt="American Avocet Image" width="530" height="775"></p>
    <p align="center"><img src="../GB Collection/American Avocet-11.jpg" alt="American Avocet Image" width="775" height="530"></p>
    <p align="center"><img src="../GB Collection/American Avocet-12.jpg" alt="American Avocet Image" width="775" height="530"></p>
    <p align="center"><img src="../GB Collection/American Avocet-09.jpg" alt="AMERICAN AVOCET" name="Avocet" width="775" height="530" id="Avocet"></p>
    <p align="center"><img src="../GB Collection/American Avocet-17.jpg" width="775" height="530"></p>
    <p align="center"><img src="../GB Collection/American Avocet-16.jpg" width="775" height="530"></p>
    <p align="center"><img src="../GB%20Collection/Avocet%20-%20CRW_5390-02.jpg" width="775" height="530">
    </p>
    <p align="center"><img src="../GB Collection/American Avocet-15.jpg" width="775" height="530"></p>
    <p align="center"><img src="../GB Collection/American Avocet-14.jpg" width="775" height="530"></p>
    <p align="center"><img src="../GB Collection/American Avocet-13.jpg" width="775" height="530"></p>
    <p align="center"><img src="../GB Collection/American Avocet-10.jpg" width="775" height="530"></p>
    <p align="center"><img src="../GB Collection/American Avocet-08.jpg" width="775" height="530"></p>
    <p align="center"><img src="../GB Collection/American Avocet-07.jpg" width="775" height="530"></p>
    <p align="center"><img src="../GB Collection/American Avocet-06.jpg" width="775" height="530"></p>
    <p align="center"><img src="../GB Collection/American Avocet-05.jpg" width="775" height="530"></p>
    <p align="center"><img src="../GB Collection/American Avocet-04.jpg" width="775" height="530"></p>
    <p align="center"><img src="../GB Collection/American Avocet-03.jpg" width="775" height="530"></p>
    <p align="center"><img src="../GB Collection/American Avocet-02.jpg" width="775" height="530"></p>
    <p align="center">  </p>
    <p align="center">  </p>
    </body>
    </html>

Maybe you are looking for