Microsoft Interview Question

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