Is there an easy way of putting all the photos in one place all the videos in one place etc.

My imac is running slow so i want to back up my my music, video, and photo files and do a clean install