Knowledgebase: Tips and tricks
Disable top-level directory deletion for archive
Posted by Sven Koester on 16 April 2007 12:01
NOTE: The following applies to PresSTORE versions from 1.5.5 up to and including 2.3.0. The 2.3.1 version and newer have the below functionality built-in so you need not configure anything extra. Older versions do not support this feature.
If you archive a directory:
and your archive plan is set to delete files/directories after they have been sucessfully archived and indexed, then everything below and including the "files_to_archive" directory will be deleted.
This behaviour, deleting of the top-level directory, is sometimes not what you'd like.
What you need to do if you want to prevent any directories to be deleted, is to make them "not empty" by putting some invisible file the (.dont_delete or such) and define a PresSTORE filter to filter-out this file during archiving. This way the file will not be archived, hence also not deleted. Because it will stay in the directory, the directory will also not be deleted, because it is not empty.
In the above example, you might create a file:
setup a filter on file name matching ".dont_delete" and assign this filter to your archive plan.