www.cryer.co.uk
Brian Cryer's Web Resources

Web Site Publisher

FAQ: How to ensure that a particular file is never overwritten when a website is published?

With Web Site Publisher, from version 1.6, it is possible to configure some files to be preserved and not overwritten when publishing, even if a newer version exists locally.

To ensure that a particular file is never overwritten (or deleted) when a website is published:

  1. You must be using Web Site Publisher version 1.6 (or later).
  2. In Web Site Publisher, double click on the website to bring up its properties.
  3. Select the tab called "Files".
  4. On the "Files" tab there are three further tabs, the one you want is "Exclusions", which will be the tab initially selected.
  5. Enter into the list under the title "File" the name of the file that you want left. You could for example use "*.txt" to exclude all text files, but if it is a single file you want preserved then just enter its name.

    If you were to enter "reminder.txt" then the file "reminder.txt" would be excluded from the copy regardless of which folder it was in.

    From Web Site Publisher 2.3.0 you can specify which instance of that file to exclude. If you want to specify that only a particular instance of that file is to be excluded then you can provide the path to it. For example:

    reminder.txt
    Refers to the file "reminder.txt" in any folder.
    \reminder.txt
    Refers to the file "reminder.txt" in the root (or top most directory) of the website.
    \folder\reminder.txt
    Refers to the file "reminder.txt" in the folder "folder" off the root of your website.
    \folder\*.log
    Refers to any file ending with ".log" found in (or below) the folder "folder" off the root of your website.
  6. Under the title "On Server" select "Ignore". The option "Delete" would tell WSP to delete the file whereas "Ignore" tells WSP to ignore the file - ignoring means that it won't overwrite it or delete it.
  7. Click [Save]