I'm IT at my small firm; and, despite my dire warnings, everyone puts files on the server with awful names, including leading & trailing spaces, bad characters (including \ ; / + . < > - etc!)
They do this by accessing the (FreeBSD/FreeNAS) server via AFP on Macs, so no part of the system complains.
Is there a script I can use to go through an entire directory tree and fix bad filenames?
Basically replace all spaces & bad ASCII with _ ... and if a file already exists, just slap a _2 or something on the end.
I don't suppose there's a way to get the system to enforce good filenaming conventions, is there?