Preventing creation of empty subdirectories when using Move with date filter

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
WiBoBnl
Junior Member
Junior Member
Posts: 3
Joined: 2021-12-14, 07:45 UTC
Location: Netherlands

Preventing creation of empty subdirectories when using Move with date filter

Post by *WiBoBnl »

Hello,
I would like to archive the files in (and under) Documents, Music, Pictures and Videos within C:\ Users\<user>\ that are older than 5 years to the same directory structure on an archive drive.
For this I like to use the Move function (F6) with a chosen date filter. The downside is that all underlying subdirectories are created even though the date of the subdirectory is outside the filter. Even if the subdirectory contains files outside the filter this subdirectory is still created empty.
Question: is there a setting or method to prevent the creation of these empty subdirectories?
Thanks in advance for your response.
HG, Wim from NL
User avatar
white
Power Member
Power Member
Posts: 5964
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: Preventing creation of empty subdirectories when using Move with date filter

Post by *white »

The help says:
Append |**\ to skip copying of empty folders.
So you should add the magic expression **\ to the exclude section of your search expression used in the field "Only files of this type". It has a special meaning when used as copy filter. It basically means only files will be copied/moved, and folders will only be created on the destination when a path needs to be created for a file.

In your case, I assume you have a saved filter for files older than 5 years. You need to adjust that filter and add |**\ to the "Search for" field (you probably have nothing in there now).

Be aware that any folders in the source folder that become empty because all files were moved, will not be deleted when you use this method.
Post Reply