Given an absolute path containing wildcards, such as C:\Program Files\VC\Redist\x64\Microsoft.*.CRT\*.dll, how can this path be resolved to a FileSet?
Consider that the path is stored in property myPath, was supplied by the user, may contain spaces and could be anywhere on the filesystem. I would require something along the lines of:
<fileset>
<include name="${myPath}" />
</fileset>
Which is of course not working, as fileset requires the dir parameter - however, I don't have a base dir I could supply. How could this be solved?
The available ant version is 1.10.5.
I have solved the problem by splitting the absolute path into a base path part and the part containing the wildcards using a regex. Usable macro:
Note that this solution additionally requires ant-contrib, and
if/unless(xmlns:if="ant:if" xmlns:unless="ant:unless"asprojectparameters).