A Python script that renames all files in a directory and its subdirectories to PascalCase (UpperCamelCase).
- python 3.XX
- Recursively processes files in all subdirectories.
- Converts filenames from various formats (snake_case, kebab-case, etc.) to PascalCase.
- Handles spaces, hyphens, and underscores automatically.
sudo apt update && sudo apt upgrade # Update the package list
sudo apt install python3 # Install Python (if not already installed)
git clone https://github.com/wc-robotec/PascalCaseRenamer.git
cd PascalCaseRenamer
python3 main.py <path-to-your-directory>
Output should be:
Welcome to the PascalCase Renamer!
Enter the directory path (or 'exit' to quit): /home/user/files
Renamed: "/home/user/files/my_file.txt" -> "/home/user/files/MyFile.txt"
Renamed: "/home/user/files/another_file-name.pdf" -> "/home/user/files/AnotherFileName.pdf"
Renaming complete!
Enter the directory path (or 'exit' to quit): exit
Exiting the application. Goodbye!
my_folder/
├── my_file.txt
├── another-file.pdf
└── sub_folder/
└── test file.docx
my_folder/
├── MyFile.txt
├── AnotherFile.pdf
└── sub_folder/
└── TestFile.docx
Ensure you have a backup of your files before running the script, as file renaming is irreversible.
This project is licensed under the terms of the MIT License.