A prior post indicated this can be done in the Windows command line.
viewtopic.php?t=9255&p=34303&hilit=directory#p34303
But this can be a bit error prone, and tedious if the user does not want all of the directories at a given tree level to be replicated.
I would like to suggest that a new function be created within FFS to duplicate a directory structure without copying the files. This process is often needed when creating a new sync job covering a set of directories. This new function would essentially be a setup function when creating a new sync job.
Thank you.
Sync only the directory tree
- Posts: 10
- Joined: 28 Feb 2019
- Posts: 2450
- Joined: 22 Aug 2012
> I would like to suggest that a new function be created within FFS to
duplicate a directory structure without copying the files.
This already possible by:
• changing the Include Filter from * into *\
this should only include (and thus sync) directories
If you don't want all directories to be synced, first run a Compare (using above Include Filter), and then either select the directories to be included or, conversely, directories to be excluded, whichever is more convenient for your use-case.
> This process is often needed when creating a new sync job covering a set of directories.
When specifying a left or right base location, and the deepest level of the intended base location does exist yet, you can copy/paste or drag/drop the parent of the intended base location and then add/type the name of the new folder. FFS will then tell you that that location does not exist yet and ask if it should create it for you.
duplicate a directory structure without copying the files.
This already possible by:
• changing the Include Filter from * into *\
this should only include (and thus sync) directories
If you don't want all directories to be synced, first run a Compare (using above Include Filter), and then either select the directories to be included or, conversely, directories to be excluded, whichever is more convenient for your use-case.
> This process is often needed when creating a new sync job covering a set of directories.
When specifying a left or right base location, and the deepest level of the intended base location does exist yet, you can copy/paste or drag/drop the parent of the intended base location and then add/type the name of the new folder. FFS will then tell you that that location does not exist yet and ask if it should create it for you.
- Site Admin
- Posts: 7210
- Joined: 9 Dec 2007
You should have read the whole thread. The solution with FFS is right there: viewtopic.php?t=9255#p34607A prior post indicated this can be done in the Windows command line.
viewtopic.php?t=9255&p=34303&hilit=directory#p34303 chota300, 22 Aug 2022, 21:03
This doesn't work because there is an additional FFS filter rule:> I would like to suggest that a new function be created within FFS to
duplicate a directory structure without copying the files.
This already possible by:
• changing the Include Filter from * into *\
this should only include (and thus sync) directories Plerry, 23 Aug 2022, 07:46
I've added this to https://freefilesync.org/manual.php?topic=exclude-files• If the filter is matching a folder, all its files and subfolders are also (implicitly) matched. Thus the filter phrases SubFolder\ and SubFolder\* are synonymous.
This rule doesn't apply to the new *:. So the solution to OP's request is just a simple *: exclude filter.
- Posts: 10
- Joined: 28 Feb 2019
Thank you both for your help.
I have read these replies repeatedly and have to admit that I still do not know what the correct method is.
Since you two do not seem to exactly agree either, I guess I should not feel too bad.
What led me to my frustration is attempting to replicate 13 selected root level directories ( only the directory trees ) into an existing directory on another disk, then sync all those selected directories at a later date ( due to the volume of files in them ) in a single sync job. I found this to be a tedious process, but I eventually got it done.
It would not surprise me too much if I were in the small minority of users attempting such a task. But perhaps others essentiallly do much of the same when creating a new sync job. If so, perhaps it is worthwhile to create a high-level filter option/switch to sync only the directory trees. Or maybe add a separate example of the include and/or exclude filters required for such. Even better would be an interface to select a number of directories on the source side, then select the top ( disk or directory ) for the target side, and build the sync job to sync the directory trees. But then again I do tend to think out of the box.
So thank you for your help.
If features or examples are added, I will try them as my needs arise.
If not, I will deal with the status quo.
FFS is a very good product as is.
I have read these replies repeatedly and have to admit that I still do not know what the correct method is.
Since you two do not seem to exactly agree either, I guess I should not feel too bad.
What led me to my frustration is attempting to replicate 13 selected root level directories ( only the directory trees ) into an existing directory on another disk, then sync all those selected directories at a later date ( due to the volume of files in them ) in a single sync job. I found this to be a tedious process, but I eventually got it done.
It would not surprise me too much if I were in the small minority of users attempting such a task. But perhaps others essentiallly do much of the same when creating a new sync job. If so, perhaps it is worthwhile to create a high-level filter option/switch to sync only the directory trees. Or maybe add a separate example of the include and/or exclude filters required for such. Even better would be an interface to select a number of directories on the source side, then select the top ( disk or directory ) for the target side, and build the sync job to sync the directory trees. But then again I do tend to think out of the box.
So thank you for your help.
If features or examples are added, I will try them as my needs arise.
If not, I will deal with the status quo.
FFS is a very good product as is.
- Posts: 2450
- Joined: 22 Aug 2012
> Since you two do not seem to exactly agree
When in doubt, follow the advice of Zenju.
After all, Zenju is the author of FFS; I am just a (meanwhile) experienced user.
When in doubt, follow the advice of Zenju.
After all, Zenju is the author of FFS; I am just a (meanwhile) experienced user.