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.
Macros do not expand within filters
- Posts: 8
- Joined: 16 Mar 2016
- Posts: 8
- Joined: 16 Mar 2016
Bump. I've attached some pictures that illustrate the problem.
The following screenshot shows the macro having no effect: While this screenshot shows the numeric value filtering as expected:
Thank you for your help.
The following screenshot shows the macro having no effect: While this screenshot shows the numeric value filtering as expected:
Thank you for your help.
-
- Posts: 2978
- Joined: 22 Aug 2012
Although the Manual section on Macros states:
Zenju, can you confirm?
If so, why not? It seems to make sense.
it seems the use of macro's is (presently) not supported in Include/Exclude Filter definitions.All directory paths may contain macros that are expanded during synchronization.
Zenju, can you confirm?
If so, why not? It seems to make sense.
-
- Site Admin
- Posts: 7523
- Joined: 9 Dec 2007
Yes.Although the Manual section on Macros states:it seems the use of macro's is (presently) not supported in Include/Exclude Filter definitions.All directory paths may contain macros that are expanded during synchronization.
Zenju, can you confirm? 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.If so, why not? It seems to make sense. Plerry, 15 Apr 2020, 08:30
Also note that a lot of the environment variables resolve to absolute paths, so don't work as a filter expression anyway.