Despite the problem that filesharing poses to the creative industries, there is little research on the effectiveness of governmental anti-piracy policies. This study analyzes how the HADOPI graduated response law in France affected digital music sales. Using a panel of sales data from the four major labels, we applied a difference-in-difference approach, comparing sales trends in France to a control group of European countries. We find that increased consumer awareness of HADOPI caused French iTunes music sales to increase by 22-25%. The observed sales increase is larger in high piracy genres than low piracy ones, strengthening the causal interpretation of our results.