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:
macro.PNG
While this screenshot shows the numeric value filtering as expected:
2020.PNG
Thank you for your help.
You do not have the required permissions to view the files attached to this post.
User avatar
Posts: 3020
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: 7566
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.