Is it possible to backup a directory and its subdirectories (several levels deep) and exclude all files, using a Windows File System agent, i.e. I only want to backup the directory structure. I’ve looked at Filters and wildcards but could not see how to achieve this.
Backup directory structure only - excluding all files

Best answer by StephenT
I appreciate all your replies.
Our current backup configuration is as
My original question was just me wondering “what if”. E.g.
- Changes to the directory structure. The directory structure currently includes a “/MSSQL15.MSSQLSERVER/” directory. What if one day the directory structure has a MSSQL16.MSSQLSERVER directory. Will someone remember to add this directory (as described by
@christopherlecky ) to the content of the File System backup of the D and L drives using the “define content” method. - What if someone creates a non-database file on the D or L drives (for whatever reason). Using the “define filters” method, this file will be backed up unless the file extension is listed in the filters.
I have decided to continue with our current setup of defining filters to exclude .mdf .ldf and .ndf files. These filtered backups of the D and L drives are less than 2 MB. One day it might backup a large non-database file that someone has created, but I think this is preferable to missing directories if the directory structure is ever changed and the changes aren’t added to the content of the File System subclient.
Thanks for everyone’s help.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.