Hi,
I am experiencing an issue where empty folders are left behind in the destination directory after a synchronization. Here are my current settings:
Variant: Mirror
Deletion Policy: Versioning (Custom folder: D:\Backup_Archive\%day%.%month%.%year%)
Comparison: Time and Size
The Problem:
When I rename a folder in the source (e.g., from Folder_A to Folder_B), FreeFileSync correctly moves the files from Folder_A to the Versioning (Archive) folder and creates Folder_B in the destination. However, the original Folder_A remains in the destination as an empty (0 KB) folder.
It seems like the "Versioning" process moves the files but doesn't clean up the now-empty parent directory in the main destination.
Example:
Source: \Folder_A (renamed to) -> \Folder_B
Destination after sync:
\Folder_B (with files)
\Folder_A (remains, but empty/0 KB)
Is there a setting to ensure these empty "ghost" folders are also moved to the archive or deleted during the Mirror process when Versioning is enabled?
Thank you.
Empty folders
- Posts: 4
- Joined: 18 Apr 2026
- Posts: 4
- Joined: 18 Apr 2026
I am currently using the following batch script as a post-sync command to clean up these ghost folders:
for /f "delims=" %%i in ('dir "D:\Backup" /s /b /ad ^| sort /r') do rd "%%i" 2>NUL
However, this is not an ideal solution because it creates a new problem: What if I have intentional empty folders in my source directory? This script will delete them in the destination as well, which breaks the 'Mirror' logic.
Is there any way for FreeFileSync to handle this natively? It should ideally recognize that if a folder was renamed or deleted in the source, its corresponding folder in the destination should be completely removed (or moved to the archive) along with its parent structure, without leaving these 0KB residues.
P.S.: I have also tried enabling the 'Use database file to detect changes' option in the Synchronization settings, but it did not resolve the issue. The empty folders still persist in the destination after a rename or delete operation in the source, even with the database feature active.
for /f "delims=" %%i in ('dir "D:\Backup" /s /b /ad ^| sort /r') do rd "%%i" 2>NUL
However, this is not an ideal solution because it creates a new problem: What if I have intentional empty folders in my source directory? This script will delete them in the destination as well, which breaks the 'Mirror' logic.
Is there any way for FreeFileSync to handle this natively? It should ideally recognize that if a folder was renamed or deleted in the source, its corresponding folder in the destination should be completely removed (or moved to the archive) along with its parent structure, without leaving these 0KB residues.
P.S.: I have also tried enabling the 'Use database file to detect changes' option in the Synchronization settings, but it did not resolve the issue. The empty folders still persist in the destination after a rename or delete operation in the source, even with the database feature active.
- Posts: 4908
- Joined: 11 Jun 2019
This doesn't make sense. If the Folder_A doesn't exist in the source, it should delete it in the destination. Are you excluding empty directories in your config settings?
- Posts: 4
- Joined: 18 Apr 2026
I have checked my Filter (F7) settings and I am not excluding empty directories. Also, there are no hidden files like desktop.ini inside these folders (they are 0KB). The issue only seems to occur when Versioning is enabled. When I use 'Permanent Delete' instead of 'Versioning', the folders are removed correctly. It feels like the Versioning process leaves the folder shells behind.
I have uploaded a screen recording to demonstrate the issue. You can see my configuration and the sync behavior in the video below:
Video Link: https://youtu.be/Vf6jxOGzvs8
I have uploaded a screen recording to demonstrate the issue. You can see my configuration and the sync behavior in the video below:
Video Link: https://youtu.be/Vf6jxOGzvs8
- Posts: 4
- Joined: 18 Apr 2026
I am curious if anyone else is experiencing this same issue. If you are using Mirror mode combined with Versioning, could you please check your destination folders?
Do you see empty (0 KB) folders remaining after you rename or delete a folder in your source? It would be very helpful to know if this is a common behavior or specific to my environment.
Thanks.
Do you see empty (0 KB) folders remaining after you rename or delete a folder in your source? It would be very helpful to know if this is a common behavior or specific to my environment.
Thanks.