Sync only folders

Get help for specific problems
Posts: 4
Joined: 31 Mar 2022

svnkn

Hey folks!
Is it possible to sync only the folders without the subfolders or files?
I already tried different exclude phrases, but didn’t get it to work.

Thank you for your help!
User avatar
Site Admin
Posts: 7212
Joined: 9 Dec 2007

Zenju

https://freefilesync.org/manual.php?topic=exclude-files
Exclude:
All subdirectories of the base directories *\
Posts: 4
Joined: 31 Mar 2022

svnkn

https://freefilesync.org/manual.php?topic=exclude-files
Exclude:
All subdirectories of the base directories *\
Zenju, 31 Mar 2022, 11:31
That didn't work for me.
I want the following:

==> Source Folder Example
        - Folder 1
            /File 1.txt
            /Folder 1.1/File 2.pdf
            /Folder 1.2
           
        - Folder 2
            /File 3.png
            /Folder 2.1/File 4   
       
        - File 5.pdf
        - File 6.png
==> Sync Folder
        - Folder 1
        - Folder 2
The exclude code
*\
Did the following:
        - File 5.pdf
        - File 6.png
User avatar
Posts: 4059
Joined: 11 Jun 2019

xCSxXenon

So you don't want any files to sync? Just the directory names?
Posts: 4
Joined: 31 Mar 2022

svnkn

Exactly!
Posts: 16
Joined: 10 Jun 2019

Backitup

You can try the following: Xcopy with the /T switch

/T Creates directory structure, but does not copy files. Does not
include empty directories or subdirectories. /T /E includes
empty directories and subdirectories.

Not tested by me.
Posts: 4
Joined: 31 Mar 2022

svnkn

You can try the following: Xcopy with the /T switch

/T Creates directory structure, but does not copy files. Does not
include empty directories or subdirectories. /T /E includes
empty directories and subdirectories.

Not tested by me. Backitup, 22 Jun 2022, 17:53
Can I trigger this on folder creation?
User avatar
Posts: 4059
Joined: 11 Jun 2019

xCSxXenon

You could use RTS to monitor the directory and run that command upon any changes.
User avatar
Site Admin
Posts: 7212
Joined: 9 Dec 2007

Zenju

I want the following:

==> Source Folder Example
        - Folder 1
            /File 1.txt
            /Folder 1.1/File 2.pdf
            /Folder 1.2
           
        - Folder 2
            /File 3.png
            /Folder 2.1/File 4   
       
        - File 5.pdf
        - File 6.png
==> Sync Folder
        - Folder 1
        - Folder 2
svnkn, 31 Mar 2022, 11:43
Use ?*\?* as exclude filter to get rid of items in sub folders.
?* means "one or more" characters.

To get rid of the files in base folders, you can use an include filter of ?*\ (folders only) or an exclude filter of *: (files only, requires FreeFileSync 11.24).

See (updated): https://freefilesync.org/manual.php?topic=exclude-files