Pure Python script for Sorting and Arranging Files in a Directory
This Python program is designed to sort and arrange files in a directory based on their file extension. The program loops through each file in the directory, checks its file extension, and moves it to the corresponding directory based on a pre-defined dictionary that maps file extensions to their corresponding directories.
To use this program, you will need to have Python installed on your computer. You can download Python from the official website at https://www.python.org/downloads/.
Once you have Python installed, download the sort_files.py file from this repository and save it in the directory where you want to sort and arrange your files.
To use the program, open a terminal window and navigate to the directory where the sort_files.py file is located. Then, run the following command:
Copy code
python sort_files.py
The program will then loop through each file in the directory, check its file extension, and move it to the corresponding directory based on the pre-defined dictionary. The program will print a message to confirm that the files have been sorted and arranged successfully.
Note : You can modify the file_extensions dictionary in the program to add or remove file extensions and corresponding directories as needed.
This program is licensed under the MIT License. See the LICENSE file for more information.
This program was created by CapacityBay . Special thanks to the CapacityBay Tech team for their work on the encouraging and facilatating open source software like this.
- Brian Obot [email protected]
- Add your name and email address as a maintainer.