This Python script (fileOrganize.py
) organizes files in a given directory based on their file extensions.
How it Works
- Input: You'll be prompted to enter the directory path where your files are located.
- Organization: The script creates a new directory named
Organized
within the specified directory (if it doesn't exist already). It then sorts the files into subdirectories based on their file extensions. - Output: The organized files are moved into respective folders based on their file extensions within the
Organized
directory.
How to Use
- Clone this repository or download the
fileOrganize.py
script.shellgit clone https://github.com/kimkorngmao/python-file-organization.git
- Open a terminal or command prompt.
- Navigate to the directory where
fileOrganize.py
is located. - Run the script by typing
python fileOrganize.py
and follow the prompts to enter the directory path.
Note
- Ensure that you have Python installed on your system.
- This script does not handle subdirectories within the specified directory.
- If a file with the same name already exists in the destination directory, it will be overwritten.