I have a need to regularly copy files from a specific set of source sub directories (100's of them) into a 'flat" directory structure, i.e. i want all the files from the multiple source directories in a single destination directory. I can't seem to find a way of copying that can look into the source sub directories & copy the files that doesn't re-create the sub-directory folder structure in the destination directory.
Any help appreciated.
or (prevent overwrites)
Note this will not work if any of the names of the files or subdirectories in $sourcedir contain spaces.