Exclude files and folders by filter when I create archive

I want to create a zip to backup a folder.
I want to exclude some files and folders, so I create filter…
Problem, files are exclude but folders persist.

Here my command

Copy ARCHIVE=.zip "c:\test" TO="c:\" CREATEFOLDER="Test_folder_Backup_{date|yyyy-MM-dd}_{time|HHmmss}.zip" FILTER="Test"

Here my 'Test' filter

Here 'Test' folder and zip result

Can I have some help about this please

Is Emplacement in French the "Path" clause or the "Full Path" one?

You need to be using "Full Path" for your filter to avoid including those two extra folders, else you're only testing their parent paths.

Yes, "Emplacement" is "Path" and "Emplacement complet" is "Full Path".
I already tried "Full Path" but it does not work. Folders are not excluded.

I think it's a limitation of the filtering the zip code supports, and it may only let you filter out files not folders.

Doing a quick test with 7z, it filters out folders, although it did still include one which had child folders, which I think is a bug on my part.

Bumping this topic, was it resolved by any chance? I have the same situation where I use a filter to exclude certain folders and date from the zip archive. It works ok-ish, the files are not copied, but the empty folders remain.

Thanks!

Zip likely still only excludes files, not folders. But the empty folders won't take up much space.

You could do a filtered copy and then zip the result if it's important to avoid the empty folders.

Thanks @Leo I will look into it. Not super important, just OCD.