This paper investigates the effects of illegal file sharing (piracy) on music and movie sales. The Swedish implementation of the European Union directive IPRED on April 1, 2009 suddenly increased the risk of being caught and prosecuted for file sharing. We investigate the subsequent drop in piracy as approximated by the drop in Swedish Internet traffic and the effects on music and movie sales in Sweden. We find that the reform decreased Internet traffic by 18 percent during the subsequent six months. It also increased sales of physical music by 27 percent and digital music by 48 percent. Furthermore, it had no significant effects on the sales of theater tickets or DVD movies. The results indicate that pirated music is a strong substitute for legal music whereas the substitutability is less for movies.