Python package to organize a folder in sub-directories based on file types.
View documentation on Readthedocs
You can install this package from:
From GitHub:
pip install git+https://github.com/kotsiossp97/pyFolderOrganizer.git@latest
From PIP:
pip install pyFolderOrganizer
import pyFolderOrganizer
path = "path/to/be/organized"
organizer = pyFolderOrganizer.FolderOrganizer(path)
Package offers "Observer Mode" that listens for any file created in the directory that the organizer is set to. Creates a thread and when a new file is detected, is automatically moved to the corresponding folder depending of the file extension.
organizer = pyFolderOrganizer.FolderOrganizer(path, observe=True)
Set the notifications
argument to True to enable windows notifications on startup and when a file gets organized.
Clicking the notification opens an explorer window to the corresponding path. This is turned off by default.
organizer = pyFolderOrganizer.FolderOrganizer(path, notifications=True)
By default, the package prints messages on the console, equivalent to the notifications. This can be turned off by setting the printing
argument:
organizer = pyFolderOrganizer.FolderOrganizer(path, printing=False)
These are the folders that will contain the files with the provided extensions. Folders are auto created, so no need to create any of them.
Folder Name | Extensions |
---|---|
CodeFiles | .py, .c, .cpp, .java, .h, .html, .php, .js, .tsx |
OfficeFiles | .txt, .doc, .docx, .xls, .xlsx, .accdb, .ppt, .pptx |
MusicFiles | .mp3, .wav, .flac |
ImageFiles | .jpg, .jpeg, .png, .gif, .dds |
Compressed | .zip, .rar, .7z, .gz |
Executables | .exe, .msi |
General | All other file extensions |
To-do