The Movie Folder Cleaner script helps you clean up your movie folders by identifying and handling folders that contain a ~ in their name. It performs the following actions:
- Lists all folders with a
~in their name. - Finds corresponding folders without
~based on a refined base name. - Deletes folders with
~if the corresponding folder has a movie file larger than 600 MB. - Moves movie files from folders with
~to corresponding folders if the latter does not have a movie file, then deletes the~folder. - Deletes folders with
~if both the~folder and the corresponding folder have large movie files. - Prints remaining folders with
~in their name. - Prints folders with multiple corresponding matches for manual handling.
- Automatically identifies and processes movie folders with
~in their names. - Safely moves or deletes folders based on predefined criteria.
- Handles cases with multiple matching folders by listing them for manual review.
- Outputs color-coded messages for easy reading in the terminal.
- Python 3.6+
- Appropriate permissions to read, move, and delete files in the specified directory.
-
Clone the repository:
git clone https://github.com/oritromax/tilde-solver.git cd movie-folder-cleaner -
Ensure you have the necessary permissions to run the script on your directories.
-
Open the script
main.pyin a text editor. -
Modify the
root_dirvariable to point to your movie directory:root_dir = "/path/to/your/root/directory"
-
Run the script:
python main.py
-
Follow the prompts in the terminal. The script will:
- List folders marked for deletion or file moving.
- Ask for your confirmation before proceeding with each action.
- Output the results, including any remaining folders and folders with multiple matches.
This project is licensed under the MIT License.
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch). - Make your changes.
- Commit your changes (
git commit -am 'Add new feature'). - Push to the branch (
git push origin feature-branch). - Create a new Pull Request.
If you have any questions or issues, please open an issue on GitHub.