Why keep files around that haven't been updated for a substantial period of time? If they aren't needed, it is oftentimes best to get rid of them; there is no need to unneccesarily use disk space. This tip explains how you can set up a container document consisting of two ChronoSync documents that, when run, will delete files that have not been modified based on a date that is specified.
Step 1. Set up the first Synchronizer document.
The first document recreates just the folder structure of the target where you want to perform the deletions. Thus if your target is named "My Target", this document will synchronize with another target named "My Empty Target" (this is a left-to-right sync with "My Target" on the left and "My Empty Target" on the right).
Step 2. Create "File Size" rule.
Create a "File Size" rule and specify that the data size must be "less than 0 KB". When this synchronization gets run, no files will get copied to "My Empty Target" because no file can have a data size less than zero. However, every folder in "My Target" will get recreated in "My Empty Target".
Step 3. Create a second Synchronizer document.
The second Synchronizer document has "My Empty Target" on the left and "My Target" on the right. It must be a Mirror left-to-right sync and "Sync Deletions" needs to be turned on. Note: The target settings for the second document are the opposite of the target settings for the first document.
Step 4. Create "Date/Time Last Modified" rule.
You then create a rule: For example, "File modification date & time is before -180:00:00:00". The "-180:00:00:00" is a relative date/time and it means "180 days ago". Don't forget the negative sign! Running this sync will delete all files which have not been modified in the past 180 days. Use whatever number you want here to indicate the time frame desired for the deletion of files.
For example, if you want files older than 45 days to be deleted, use "-45:00:00:00". Note that it is important to use "File" in the first popup rather than the default "File or folder" option.
Step 5. Create a container document.
You should combine the two in a container. Make sure that document #1 runs first because you must have a matching folder hierarchy in your empty target or else folders themselves will get deleted.
Important Note. Be Careful!
Be very careful when setting up and testing these documents since you are dealing with deletions and don't want to accidentally delete something because you made a mistake. Be sure to use the "Show All" feature on the Analyze panel which will show all the files that are being excluded by your rules. Also, be sure to "Trial Sync" the fist couple of times to become comfortable with your settings.
That's it! The flexibility and ease of using ChronoSync has so many advantages. If you have any problems while using our products, contact us by using our support form. If you wish to share a tip with us, post it on our comment form. Happy Syncing!