HOWTO extract content from web database...

My problem

I needed a link on a web page to export web content to disk / cd.

One solution

This simple tool CopyWeb installs

Download and install

file.copyweb format

Somewhat an ini-file format, with the following sections:
[Setup]
[Copy]
[TextBegin]file
[TextEnd]

In the [Setup] section you setup the operation. [Setup] can be definied many times.
[Setup]DescriptionDefault
Source=The root of the sourcefiles
Destination=The root of the destination
Explorer=if set, the applicaiton exits with an explorer view of the content1

The [Copy] section has rows with filenames, relative to Source in Setup-section. [Copy] can be definied many times
[Copy]DescriptionDefault
file.gifcopies file.gif to destination
img/file.gifcopies img/file.gif to destination/img
img/file.gif file2.gifcopies img/file.gif to destination/file2.gif

The [TextBegin] section has a textfile between [TextBegin] and [TextEnd] It will be copied to filename relative to destination. Can be definied many times.
[TextBegin]DescriptionDefault
[TextBegin]web/main.htmextracts the text between [TextBegin] and [TextEnd] to destination/web/main.htm

Example

This example extracts a portion of a database to harddisk
[Setup]
Source=\\fs01\bdb$\web\cd\mall\
Explorer=1
[Copy]
autorun.inf
favicon.ico
index.htm
web\db.css
web\db.js
web\main.htm
web\menu.htm
web\stripe.htm
web\img\logo.png
web\img\stripe.png
web\tabs_v2\tabs.css
web\tabs_v2\tabs.js
web\tabs_v2\tabs_bg.gif
web\tabs_v2\tabs_left.gif
web\tabs_v2\tabs_left_on.gif
web\tabs_v2\tabs_right.gif
web\tabs_v2\tabs_right_on.gif

[Setup]
Source=\\fs01\bdb$\web\
[Copy]
<#_cdrimgs_t>
<#LIST>
<#_cdrimgs_s>
<#LIST>
<#_cdrimgs_o>
<#LIST>

[TextBegin]web\main.htm
<HTML>
<HEAD>
 <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <LINK rel="stylesheet" type="text/css" href="db.css">
 <TITLE>Utdrag Bilddatabasen</TITLE>
</HEAD>
<BODY>
<H1>Utdrag från bilddatabas</H1>
Innehåller bilder från urval enligt <#DAT> / <#UA>
<P>
Bilderna finns nedan sorterade efter bildtext och datum då bilden producerades.
<P>
<UL>
<LI><A href="index-d.htm">Bilder sorterade efter datum</A>
<LI><A href="index-b.htm">Bilder sorterade efter bildtext</A>
</UL>
<#BESK type=br>
<P> 
Alla bilder är lagrade i 3 format.  (bilderna finns under katalog <A href="../pic">pic</A></B> på cd-skivan)
<UL>
<LI><B>t</B> - thumbnails (.png) som används till index-sidorna.
<LI><B>s</B> - skärmupplösning (.png) med mer bildinformation och en bild som kan användas till officeprogram etc.
<LI><B>o</B> - orginalformat (.eps / .tif).
</UL>
<P>
 <P> <P>
Information kring copyright och restriktioner på användning av bilderna fås från<BR>
<P> 
<P>
<SMALL>rev <#DATE>/<#USR_NAME></SMALL>
</BODY>
</HTML>
[TextEnd]

[TextBegin]web\index-b.htm
<HTML>
<HEAD>
 <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <LINK rel="stylesheet" type="text/css" href="db.css">
 <TITLE>Utdrag Bilddatabasen</TITLE>
</HEAD>
<BODY>
<H1>Index, bokstavsordning</H1>
<#_cdrindex_b>
<TABLE width="100%" cellspacing=0 border=0 cellpadding=1>
<#LIST c=6>
</TABLE>
<P>
<SMALL>rev <#DATE>/<#USR_NAME></SMALL>
</BODY>
</HTML>
[TextEnd]

[TextBegin]web\index-d.htm
<HTML>
<HEAD>
 <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <LINK rel="stylesheet" type="text/css" href="db.css">
 <TITLE>Utdrag Bilddatabasen</TITLE>
</HEAD>
<BODY>
<H1>Index, datumordning</H1>
<#_cdrindex_d>
<TABLE width="100%" cellspacing=0 border=0 cellpadding=1>
<#LIST c=6>
</TABLE>
<P>
<SMALL>rev <#DATE>/<#USR_NAME></SMALL>
</BODY>
</HTML>
[TextEnd]

<#_cdrimgs>
<#LIST>

<#_cdr>

Versions

2006-jan-02, version 0.2
Initial release

More info

if you like we can help you with more template options...

More info/questions from: Subject: CopyWeb

Keywords
Server,Windows,MoveFiles,Dir,Directory,Folder,Copy,Auto,Automatic,Web,Content,CD,DVD,Disk