Synchronize. Backup. Manual. Automatic.

Whatever your backup or sync scenario, ChronoSync Express has got you covered!

Go back to more guides

MORE GUIDES

Deleting Old Files

1. INTRODUCTION

2. SETUP 1ST TASK

3. CREATE 'FILE SIZE' RULE

4. SAVE THE TASK

5. SETUP 2ND TASK

6. CREATE 'DATE MODIFIED' RULE

7. CREATE A TASK CONTAINER

8. BE CAREFUL!

9. WHEN THINGS GO WRONG

CHRONOSYNC EXPRESS HELP

TECHNICAL SUPPORT

1. INTRODUCTION [top]

ChronoSync Express can perform some interesting operations when you combine a couple of features in a creative way. In this case, you can use ChronoSync Express to scan a file/folder hierarchy and delete any files that are older than a specified date. This is useful in the situation where you have a large number of files that you want to cull through and remove files that haven't been modified for a long period of time.

Use the steps in this guide to create two synchronizer task documents with the necessary rules that, when run in sequence, will delete files that have not been modified in the past 180 days (6 months).

2. SETUP 1ST TASK [top]

The first task is used to build an empty duplicate of the folders where you want to perform the deletions. This duplicate can be placed anywhere, just choose a location separate from the folder where the files will be deleted.

Create a new sync task. On the 'Setup Panel', set the Source Target to the location where the files will be deleted. In this example, I 'Choose' the folder called “My Old Files” located in my “Documents” folder.

Next, set the Destination Target to the location used to build the empty folder hierarchy. In this example, I click 'Choose' on the Destination Target pane, create a new folder in my Documents folder called “My Empty Old Files”, and set that folder as the Destination Target.

Verify that the 'Operation:' popup between the target panes is set to “Backup Left-to-right”.

First task setup

3. CREATE 'FILE SIZE' RULE [top]

Switch to the 'Rules' panel and create a 'File Size' rule. Just place a checkmark in the box next to 'File Size' and set the options to 'is less than', 0 (zero), and 'KB'. This tells ChronoSync Express to only sync files that are less than 0KB in size. When this synchronization is run, no files will be copied to "My Empty Old Files" because no file can have a data size less than zero. However, every folder in "My Old Files" will get recreated in "My Empty Old Files".

Create File Size rule for filtering sync

4. SAVE THE TASK [top]

Use the File->Save menu item to save this task someplace where you can find it later. Use a memorable name like “Create Empty Old Files”. Don't run the sync yet. We'll do that in Step 6.

5. SETUP 2ND TASK [top]

The second synchronizer task is used to perform the file deletions. Create a new task. On the 'Setup Panel', set the Source Target to the empty folder location, “My Empty Old Files”.

Next, set the Destination Target to the location where the files will be deleted: “My Old Files”. The Source and Destination Targets in this task are opposite of the targets chosen in the first sync task.

Set the 'Operation:' popup between the target panes to “Mirror Left-to-right”. Below the 'Operation' popup, place a checkmark in the box next to 'Synchronize deletions'. The default setting for deletions is to “Move to Archive”. This is a safety feature to keep from accidentally deleting something important. Only change this option if you have tested the tasks and are confident that you won't lose any important files during the deletion. There are testing suggestions at the conclusion of this guide.

Second task setup

6. CREATE 'DATE MODIFIED' RULE [top]

Switch to the 'Rules' panel and create a 'Date/Time Last Modified' rule. Just place a checkmark in the box next to 'Date/Time Last Modified' and set the options to 'File', 'is before', and '-180:00:00:00'.

The first option needs to be set to “File” for this procedure to work. Don't use the default "File or folder" option or you won't get the desired result.

The "-180:00:00:00" is a relative date and time that means "180 days ago". Don't forget the negative sign! This rule tells ChronoSync Express: “Only consider files that have a Last Modified date and time that is before 180 days ago.” Running this sync will delete all files which have not been modified in the past 180 days. Files newer than 180 days ago will be untouched.

You can 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". To learn more about using relative dates in Rules, be sure to view our guide on using “Relative Dates”.

Create Date Modified rule for filtering sync

Be sure to save this new sync task with a memorable name so you have it for the next step.

7. CREATE A TASK CONTAINER [top]

These two newly created sync tasks should be run in order. One method you can use to accomplish this is to create a task container. Use the 'File->New->Container' menu item to create a new task container.

Switch to the 'Tasks' panel and use the 'Add' toolbar button to add the newly created sync tasks. Make sure that task #1 runs first by placing it first in the list. If you plan to re-use this sync, name and save your container as well.

8. BE CAREFUL! [top]

Be very careful when setting up and testing these sync tasks since you are dealing with deletions and don't want to accidentally delete something because you made a mistake. You can run the sync tasks manually and in order by first clicking 'Synchronize' on the task #1 toolbar.

Next, switch to the 'Analyze' panel on task #2. Use the 'Show All' checkbox to reveal all the files and folders that will be affected by the sync rule. You can also use “Trial Sync” to get a preview of the results of the synchronization.

9. WHEN THINGS GO WRONG [top]

For most people, the above steps will work flawlessly for deleting old files. However, we live in an imperfect world and sometimes things just don't work out as expected. If you encounter any problems following this tutorial, here's some tips that may help you get back on track:

CHRONOSYNC EXPRESS HELP [top]

From the "Help" menu in ChronoSync Express, you can try some of the following search terms (minus the quotes):

"Bidirectional"
"Rules"
"Tasks"
"Containers"

TECHNICAL SUPPORT [top]

Contact our technical support team and just ask! We don’t mind — we're here to help!