A sampling of common digital media and their life expectancies (assuming you take care of them):
• Floppy disk – This can theoretically survive between 3 and 10 million passes
• CD and DVDs – It depends heavily on the materials used in their construction (PDF), but you’re looking at anywhere between 2 and 10 and 25 years, in the best of circumstances
• Flash storage – Also depends on the type, letting you write between 10,000 cycles with multi-level flash memory, or 100,000 with single-cell flash
Hard disk drives – Kind of a crapshoot—anecdotally, five years is a good average, though they can last shorter or longer, depending, again, on how they’re built

Very interesting article on digital decay and the life of digital media.