Do you see %ANT_HOME% when executing SET from the prompt?
If yes,
>filename echo %path%
should export the path as desired.
If the PATH variable does not actually contain the characters "%", it has already been resolved. And remember that “%” is actually a legitimate (but annoying) file name ...
You can set the symbol "%" to the environment variable
set var=%%something%%
set var to %something%
Magoo source share