Macros do not expand within filters

Get help for specific problems
Posts: 8
Joined: 16 Mar 2016

000

Given the following directory structure to mirror but excluding the 2020 subdirectory,
C:\temp\1\
C:\temp\1\2020\

using the filter *\2020\ works, but not the macro *\%year%\. Please tell me what I'm doing wrong. Thank you.
Posts: 8
Joined: 16 Mar 2016

000

Bump. I've attached some pictures that illustrate the problem.

The following screenshot shows the macro having no effect:
Filter settings using '*\%year%\'
Filter settings using '*\%year%\'
macro.PNG (54.72 KiB) Viewed 737 times
While this screenshot shows the numeric value filtering as expected:
Filter settings using '2020'
Filter settings using '2020'
2020.PNG (47.02 KiB) Viewed 737 times
Thank you for your help.
User avatar
Posts: 2978
Joined: 22 Aug 2012

Plerry

Although the Manual section on Macros states:
All directory paths may contain macros that are expanded during synchronization.
it seems the use of macro's is (presently) not supported in Include/Exclude Filter definitions.
Zenju, can you confirm?
If so, why not? It seems to make sense.
User avatar
Site Admin
Posts: 7523
Joined: 9 Dec 2007

Zenju

Although the Manual section on Macros states:
All directory paths may contain macros that are expanded during synchronization.
it seems the use of macro's is (presently) not supported in Include/Exclude Filter definitions.
Zenju, can you confirm? Plerry, 15 Apr 2020, 08:30
Yes.

If so, why not? It seems to make sense. Plerry, 15 Apr 2020, 08:30
It seems there is little (?) benefit in allowing it, and also little (?) risk of ambiguity because "%macroname%" is a valid file name. So probably a net zero.

Also note that a lot of the environment variables resolve to absolute paths, so don't work as a filter expression anyway.