Empty folders not being deleted on sync

Get help for specific problems
Posts: 2
Joined: 22 Sep 2013

zants

I'm syncing files/folders from my desktop to another folder on my computer (a Dropbox folder). I have 7 folders on my desktop at the moment but the Dropbox folder still has about 40 (old folders that I've since deleted on the desktop). Files are syncing correctly, it's just deleted *folders* aren't being deleted on the right. Also I noticed before posting this that if I create an empty folder in the desktop (no files inside) and use 'Compare' that it doesn't notice it's there (it's not listed in the things to be synced).

The synchronization settings are set to Mirror (error handling: ignore; deletion handling: permanent).

I think the problem lies in how I've configured the Filter.

These are my includes:

*.txt;*.pdf;*.doc;*.docx;*.dot;*.docm;*.dotx;*.dotm;*.xls;*.xlt;*.xlm;*.xlsx;*.xlsm;*.xltx;*.xltm;*.xlsb;*.xla;*.xlam;*.xll;*.xlw;*.ppt;*.pptx;*.pptm;*.potx;*.potm;*.ppam;*.ppsx;*.ppsm;*.sldx;*.sldm;*.png;*.url;*.htm;*.html;*.css;*.js;*.ico;

These are my excludes:

\System Volume Information\
\$Recycle.Bin\
\RECYCLER\
\RECYCLED\
*\desktop.ini
*\thumbs.db

I assume I need to include something in there for empty folders somehow, or is there another way to achieve this?
User avatar
Site Admin
Posts: 7281
Joined: 9 Dec 2007

Zenju

Yes, the include filter is the problem: None of the `*.txt` etc. matches a folder so they are all excluded from sync. However the solution should be simple: just add `*\` as an include filter which is a phrase that matches all folders, not not files.
Posts: 3
Joined: 1 Aug 2005

asrhael

Thank you for your reply Zenju. I tried the solution that you give us, but doesn't work for me.

I create two location for mirror sync: C:\FROM and D:\TO (left and right respectively), in wich the FROM folder has 3 subfolders inside (A, B and C). On each folder I put a different file: in A I put a DWG file (Autocad), in B I put a PDF file and in C I put a txt file.

The TO folder has a one subfolder inside (D) with no files inside.

The filter was [configured][1] to include:

*\;*.pdf


And the [result][2] is that Freefilesync delete correctly the D folder inside of D:\TO but also copy all files:

*.DWG, *.TXT and *.PDF


bypassing the include filter rule

Hope you can help me. Thanks!

I using Freefilesync V6.14.

[1]: https://db.tt/S9wSS9Qi
[2]: https://db.tt/7CZZPrzA
Posts: 3
Joined: 22 Feb 2015

syncmonte

I think I have the same problem so I will provide a simpler example of what doesn't work:
I have a network folder and a local folder each with mirrored files and subfolders. File syncing between the folders works fine. I can add, delete or move files on either location and the results are mirrored. If I create an empty subfolder on one of the main folders (network or local) the empty subfolder is correctly synced to the other location. If I delete that subfolder from the network location, the subfolder is deleted on the local folder correctly. However, If I delete the subfolder from the local folder, FreeFileSync goes through the motions of deleting the subfolder on the network folder, but the subfolder never gets deleted. There are no error messages or anything, it just seems to be happy that the deletion occurred. The next time a sync occurs, the folders that should have been deleted on the network location are now synced back to the local folder and magically reappear.

This is maddening when you have moved, deleted and consolidate directory structures on your local folder only to have empty folders reappear. Of course, then you have to go check to see if they are really empty and if everything else synced properly. This really needs to be fixed as the explanation about includes and excludes doesn't seem to fit. It works one way but not the other way even though file syncing works fine. Empty network folders/subfolders need to be deleted when you delete them from the local folder/subfolder.

Thanks greatly for your help in looking into this
User avatar
Site Admin
Posts: 7281
Joined: 9 Dec 2007

Zenju

Thank you for your reply Zenju. I tried the solution that you give us, but doesn't work for me.

I create two location for mirror sync: C:\FROM and D:\TO (left and right respectively), in wich the FROM folder has 3 subfolders inside (A, B and C). On each folder I put a different file: in A I put a DWG file (Autocad), in B I put a PDF file and in C I put a txt file.

The TO folder has a one subfolder inside (D) with no files inside.

The filter was [configured][1] to include:

*\;*.pdf


And the [result][2] is that Freefilesync delete correctly the D folder inside of D:\TO but also copy all files:

*.DWG, *.TXT and *.PDF


bypassing the include filter rule

Hope you can help me. Thanks!

I using Freefilesync V6.14.

[1]: https://db.tt/S9wSS9Qi
[2]: https://db.tt/7CZZPrzAasrhael
Confirmed: The `*\` syntax to include only folders but not files is not working anymore due to recent design changes for the filter:
FFS now assumes that if the user added a folder as include, he also wants to include all child elements.
User avatar
Site Admin
Posts: 7281
Joined: 9 Dec 2007

Zenju

I think I have the same problem so I will provide a simpler example of what doesn't work:
I have a network folder and a local folder each with mirrored files and subfolders. File syncing between the folders works fine. I can add, delete or move files on either location and the results are mirrored. If I create an empty subfolder on one of the main folders (network or local) the empty subfolder is correctly synced to the other location. If I delete that subfolder from the network location, the subfolder is deleted on the local folder correctly. However, If I delete the subfolder from the local folder, FreeFileSync goes through the motions of deleting the subfolder on the network folder, but the subfolder never gets deleted. There are no error messages or anything, it just seems to be happy that the deletion occurred. The next time a sync occurs, the folders that should have been deleted on the network location are now synced back to the local folder and magically reappear.

This is maddening when you have moved, deleted and consolidate directory structures on your local folder only to have empty folders reappear. Of course, then you have to go check to see if they are really empty and if everything else synced properly. This really needs to be fixed as the explanation about includes and excludes doesn't seem to fit. It works one way but not the other way even though file syncing works fine. Empty network folders/subfolders need to be deleted when you delete them from the local folder/subfolder.

Thanks greatly for your help in looking into thissyncmonte
This issue is unrelated to this thread: Obviously there is some issue with the network (drivers?) that silently fail when deleting a directory, which leads to the observed behavior as FFS is unknowing of deletion errors despite checking for them.
Posts: 3
Joined: 22 Feb 2015

syncmonte

This issue is unrelated to this thread: Obviously there is some issue with the network (drivers?) that silently fail when deleting a directory, which leads to the observed behavior as FFS is unknowing of deletion errors despite checking for them.Zenju
Thanks, should I open a new thread? In the mean time, I am trying to understand what you are saying. I think you are saying that the network drivers can create folders, can create and delete files in the folders, but can't recognize that the folders are to be deleted? That is what is happening. It just seems unlikely. But if no one else has ever seen this then I guess I need to look into another cause of the problem. Thanks again.
User avatar
Site Admin
Posts: 7281
Joined: 9 Dec 2007

Zenju

Thanks, should I open a new thread? In the mean time, I am trying to understand what you are saying. I think you are saying that the network drivers can create folders, can create and delete files in the folders, but can't recognize that the folders are to be deleted? That is what is happening. It just seems unlikely. But if no one else has ever seen this then I guess I need to look into another cause of the problem. Thanks again.syncmonte
Hard to say what the problem is, but it's very unlikely to be caused by FFS. What might help to find out what's going on is a Process Monitor log. However all it will probably reveal is a bug somewhere in the network stack.
Posts: 3
Joined: 1 Aug 2005

asrhael

Confirmed: The `*\` syntax to include only folders but not files is not working anymore due to recent design changes for the filter:
FFS now assumes that if the user added a folder as include, he also wants to include all child elements.Zenju
Thanks Dev for your quick answer. Your answer gives me a second question, this will be the normal behavior of your app?
User avatar
Site Admin
Posts: 7281
Joined: 9 Dec 2007

Zenju

Thanks Dev for your quick answer. Your answer gives me a second question, this will be the normal behavior of your app?asrhael
Yes
Posts: 3
Joined: 1 Aug 2005

asrhael

YesZenju
Thanks Dev. I'm sorry to hear that your software normal behavior exclude the managment of orphan dirs. Now I testing with DirSync pro.

Again, thanks for your time.
Posts: 3
Joined: 22 Feb 2015

syncmonte

Hard to say what the problem is, but it's very unlikely to be caused by FFS. What might help to find out what's going on is a Process Monitor log. However all it will probably reveal is a bug somewhere in the network stack.Zenju
OK, thanks... I will see if I can track it down. In the mean time, I guess I have to delete empty folders manually.