We have a lot of photos, music and files. Normally we copy the files up to some network storage (so it’s backed up) and later on we come back and name and sort everything. But then, some chaos happens; maybe we get distracted so end up copying the files twice. Or maybe we’ve been away and I’ve backed them up to another device and then copied two sets of files later. Or a set of files were copied to another computer and some of them (but not all) were modified before copying them back.
The upshot is that there’s precious NAS storage being wasted. But how to find where the duplicate files are? Sounds like an excuse reason to put on my scripting hat!
Subsequently to writing this I did some more work on the script. So now there are two more parts; this post covers the basic script while part 2 details putting code in to allow resuming the script after a restart (or crash) and finally part 3 does the same thing but using PowerShell workflows.
Continue reading “PowerShell : Finding Duplicate Files, Part 1 : The Basic Script”