Help moving files from sub-folders to a single folder

I've figured out how to scan a folder for subfolders and then make a move action. The problem is I only want to copy the contents of the sub folders either to the containing folder or possibly another folder without the subfolders that contain the files. I know this is an easy one but I can't seem to get it working.