Go to the top folder all the files/sub folders are in. In the search box, top right, type *.* . This will search for all files & folders.
Once the search has finished select all the files (all the folders should be in one block), and the cut them, Ctrl+X.
Navigate to the folder you want to hold all the files then paste, Ctrl+V.
Go back to the original folder and do another search for *.* to check you didn't miss any files, then you can delete the original folder(s).