A small Python CLI for renaming files and directories into lowercase, hyphen-separated, ASCII-friendly names.
I usually use this as a pre-processing step before copying over files/folders from Windows to WSL!
From the project directory, install it with:
pip install -e .slugify .
slugify Downloads
slugify . --recursive
slugify . --dry-run
slugify . --keep-case
slugify . --applyBy default, the tool previews changes without renaming anything. Use --apply to perform the renames.
>> slugify files --recursive --apply
Renamed: More files -> more-files
Renamed: My file.txt -> my-file.txt
Renamed: My files.txt -> my-files.txt
Renamed: (Some more) text files.txt -> some-more-text-files.txt
Renamed: Another directory (again) -> another-directory-again
Renamed: & One last file.docx -> and-one-last-file.docx