-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Labels
enhancementNew feature or requestNew feature or requesthacktoberfestHacktoberfest 2023 contributionsHacktoberfest 2023 contributionshacktoberfest-2024pythonpython-modulePython utility/resuable module, which can be imported in different scriptsPython utility/resuable module, which can be imported in different scriptspython-scriptPython utility/automation scriptPython utility/automation script
Description
File Sorter
How It Works
- It works with the simple principle of organizing files in a given folder with it's filetypes.
- The
fileExtensions.pyconsists a map with each file type to a certain folder name. - The main program looks for all singular scattered files in a given desktop location, ignoring all folders.
- And it proceeds to create folders for each depending on the map of the file extensions.
- Assuming the program has permission to move items in the given location, it will proceed to move the files to their designated folder.
Command Line Functionality
- Added the functionality to call it through command-line
- You can call it either through:
python "Path/To/PythonFile" "Path/To/Directory/To/Be/Sorted"
eg. python "C:/Users/test/FileSorter/fileSort.py" "C:/Users/test/Downloads"
- Or alternatively, with a slight setup process, you can run "FileSort" in any powershell terminal and it'll sort the CWD.
Setup for FileSort PWSH Function
-
- Open Powershell, type the command
notepad $PROFILE
- Open Powershell, type the command
-
- Add a function to the profile:
function fileSort {
$cwd = Get-Location
python "Path/To/PyFile" $cwd # Change Path/To/PyFile with location where the python file is saved.
}
-
- After the setup, you can open powershell in any folder and run the command "FileSort" with which, it's going to sort all the files in the working directory
Requirements
- Python3: As this project was built entirely with Python, Python3 is required with the latest version being recommended.
- The libraries used which need to be installed are
tkinterandcustomtkinter, as these were used to make the user interface for the program. - You can install them by:
-
pip install tk pip install customtkinter
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requesthacktoberfestHacktoberfest 2023 contributionsHacktoberfest 2023 contributionshacktoberfest-2024pythonpython-modulePython utility/resuable module, which can be imported in different scriptsPython utility/resuable module, which can be imported in different scriptspython-scriptPython utility/automation scriptPython utility/automation script