Use find:
find folder0 -type f -exec cp {} targetfolder \;
With GNU coreutils you can do it more efficiently:
find folder0 -type f -exec cp -t targetfolder {} +
The former version runs cp for each file copied, while the latter runs cp only once.