问题
My problem is that I have a number of directories I have to look into programmatically, in Java. These directories all have the same pattern:
d:\a\b\c\??_????\d\
I cannot find a way to do this smartly. Any FileFilter (I use WildcardFileFilter) will need a base directory to look into, as they only works with listFiles(), yet in my case there is not base directory as my paths are absolute. I've unsuccessfully tried a few tricks from the Web and then I'm stuck. Your help will be greatly appreciated.enter link description here
回答1:
Try use listFilesAndDirs pointing to root folder or to d:\a\b\c.
来源:https://stackoverflow.com/questions/25682140/resolve-absolute-paths-with-wildcards-in-java-6