I have a directory structure in which i have some specific files (say mp3 files) organised directly or in subdirectories(upto n levels). For example:
- Music Folder
- a.mp3
- folder2
- folder3
- b.mp3
- c.mp3
- folder4
- d.mp3
- folder5
- folder6
- folder7
- folder8
- e.mp3
Now, what i require is to copy all files (.mp3 file) from all the folders and subfolders into another target folder. So my target folder would be like this:
- targetFolder
- a.mp3
- b.mp3
- c.mp3
- d.mp3
- e.mp3
I tried the answers from following questions: Recursive copy of specific files in Unix/Linux?
and Copy all files with a certain extension from all subdirectories, but got copied the same directory(and subdirectories) structure.
Any help or suggestions?