Microsoft interview question

How would you write an algorithm that determines whether there are any duplicate files within the same folder?