This project is a Python-based automation script designed to perform file management tasks automatically. It helps organize files by deleting empty files and renaming existing files using a standardized naming convention. The script also maintains a log of all operations performed, making it easy to track and monitor changes.
- Accepts a folder path from the user.
- Detects and deletes empty files.
- Renames files using a consistent naming convention.
- Generates a log file containing details of all operations.
- Uses exception handling for error management.
- Built using Python's OS module for file and directory operations.
- Python 3
- OS Module
- Datetime Module
- The user enters the path of the target folder.
- The script scans all files in the folder.
- Empty files are identified and deleted.
- Remaining files are renamed sequentially.
- Every operation is recorded in a log file.
- Any errors encountered are handled using exception handling.
File-Cleanup-Automation/
│
├── file_cleanup.py
├── README.md
├── operations_log.txt
└── screenshots/
Enter folder path: /workspaces/internspark_internship/file-test
Deleted: empty.txt
Renamed: report.pdf -> File_1.pdf
Renamed: notes.txt -> File_2.txt
Renamed: addresses.csv -> File_3.csv
Automation completed successfully.
- Understanding file handling using the OS module.
- Implementing automation scripts in Python.
- Using exception handling for robust applications.
- Creating and maintaining log files.
- Managing project documentation using GitHub.
- Sort files into folders based on file type.
- Add support for custom naming conventions.
- Generate detailed log reports.
- Provide a graphical user interface (GUI).
Sinchana L Gowda