How can I reverse the directory structure for files using Ant.
For example, I have the following
C:\some\path\a\b\file1.txt
C:\some\path\y\z\file2.txt
I would like to convert this to
C:\some\dir\b\a\file1.txt
C:\some\dir\z\y\file2.txt
In terms of variables in Ant, I know C:\some\path and C:\some\dir, but I don't know the directories a,b,y,z (those are entirely dynamic).
Ideally it would to be a separate directory (e.g. from path -> dir), but in-place is OK to since I can just copy elsewhere first.
I thought globmatcher/regexmatcher might help, but I think they only change the file name, not the directory name.