Unable to delete the folder because it is not empty. The directory is not empty.

During a synchronization, you may receive the following exception:

Exception: Folder delete will continue to be retried, but may never complete.
Unable to delete the folder because it is not empty.
The directory is not empty

Windows does not allow you to delete a folder that is not empty and will return this message. The contents of the folder must be deleted first and then the folder.

If you have any exclusions on your Rule, such as exclusions on the File Masks tab that exclude a file contained within the folder SureSync is attempting to delete, you will receive this message. For example, if you exclude *.tmp and the folder contains a *.tmp folder. There are exclusions on a number of tabs in the Rule, so you would need to review any defined exclusions.

The allow folder truncation deletes option will help in some, but not all, cases of this exception. A folder truncation delete is a special type of folder delete that does not pay attention to the content of the folder. This will allow deletes in instances where something like a *.tmp file is excluded. However, truncation deletes cannot be used in all situations like with File Locking enabled. You can confirm the truncation delete option is on by clicking on the Job in question, clicking on the Options tab, and confirming that "Allow folder truncation deletes" is enabled. It is a setting that is on by default, so in most situations, it should already be on.

If the exception continues, it's often easiest to look at the folder in question on each server and delete it manually if appropriate. The other option is to remove the exclusions from your Rule that are leading to the problem and stop/start the Job for the new settings to take effect.