App to transfer the files by shaking the iPhone? Is there any iPhone app that allows me to transfer music to another iPhone by shaking the iPhone nearby?
http://bu.mp/ does the job.

Simply get the app on both iPhones, open the apps and "bump" them together to share the files.