DETOX
Clean up filenames
You don’t have to get up at 4am and practise yoga to find balance in life. Shashank Sharma found inner peace by cleaning up filenames.
OUR EXPERT
Shashank Sharma is a trial lawyer in Delhi, India. He’s been writing about open source software for 20 years and lawyering for 10.
Filenames come in all shapes and sizes, and are often made up of unsavoury characters. That’s because there’s no defined rules for naming files, which are often a reflection of the user’s mind. You’ll find files with unnecessary spaces, hyphens, underscores, numbers and myriad other characters. If you’ve ever worked on a project that required sharing files with colleagues or peers, you’ll have come across, suffered and resented this lack of file-naming convention. The lack of discipline in naming files can become even more tiresome when working on the CLI, as you have to escape some characters and spaces. Thankfully, Detox can help bring sanity to filenames.
Detox
is equipped with a number of file-renaming rules, called sequences. You can define the sequence you wish to run on a specified file or files, or recursively on a directory if you wish to rename all comprising files. The lower sequence, for instance, replaces all uppercase characters in the filename with lower-case ones.
Can’t fix what isn’t broken