I have a directory structure like
a/b/xyz
a/d/xyz
a/f/g/xyz

I need to move all the files with name xyz maintaining the directory structure to a existing folder named temp. How should i do it using in java. There are two tasks involved here 1) to search the xyz files inside a directory and 2) copy them with the same directory structure..