Knowledgebase: Tips and tricks
Disable top-level directory deletion for archive
Posted by Sven Koester, Last modified by Sven Koester on 17 April 2007 8:23
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.
(1249 vote(s))
Not helpful

Comments (0)
Post a new comment
Full Name:
CAPTCHA Verification 
Please enter the text you see in the image into the textbox below (we use this to prevent automated submissions).