Automatically Updating the Site Map
Knowledge Base Article kb02
Introduction
Whilst maintaining
the pages that you are using Site Map Pro to map, you may find that
you need to recreate the sitemap.html file when pages are updated, added
or removed.
This can be done by running Site Map Pro again to recreate the sitemap.html file.
This is a one step process if you save a configuration file after indexing.
However the
entire site map recreation process can be automated for solutions that require
a remap at frequent or specified intervals. For instance you may be using
the software to create a site map for the contact information on your Intranet.
The site map would need to be refreshed on a daily basis to reflect ever
changing contact information stored within the web pages.
Command Line Options
You can achieve
this automation by using Command Line Options. These are parameters that
are passed to the application when it starts.
The syntax
used to automate Site Map Pro is:
sitemapp.exe
/o <myo configuration file> [/s <file name>]
Command Line
Example
This command
line:
sitemapp.exe
/o c:\myweb\default.myo /s z:\intranet\publish\contact\sitemap.html
will open the
saved configuration file c:\myweb\default.myo, map the website, and save the site
map
to z:\intranet\publish\contact\sitemap.html
Command Line
Reference
| /o
<myo configuration file> |
Open a previously saved Site Map
Pro configuration file. |
| /s
<full filename> |
Save the generated
sitemap.html file. The full filename must be provided, such as C:\My
Documents\Webroot\sitemap.html. If this switch
is not used then the file is saved to C:\sitemap.html |
Automating
the Script
The final
step needed in our example is to automate the running the command. This
can be done using your operating systems "Scheduled Tasks" option. This
is available in Windows 98/ME/NT/2000/XP.
First create
a batch file using a text editor and type your single command line. This
should be saved as a batch file, for example "Update Contact Sitemap.bat"
By selecting
the "Add scheduled task" you can set the script to run this batch file
(which will run Site Map Pro with your preferred options) at any preferred
interval.
Note that it is required that the scheduled task is run under the user account that
installed and registered the application on the system.
Support Page