Utility Package that organizes and moves the specific file types to its type Specific Directories
Project description
Directory Organizer
Package
Have a cluttered Folder/Directory? No Worries!
Directory Organizer
is a simple Python Package that scans your folder directory and moves the specific file types to its type-specific directories.
Currently Available for Debian and Windows based Systems.
Class Documentation
class directory_organizer.organizer(path = 'Downloads', verbose = False)
By default, path = 'Downloads'
of the Base OS and verbosity = False
ie no output to the console regarding files moved.
Parameters | Description |
---|---|
path | Absolute path to the directory when we want to perform our operation. |
verbose | Controls the verbosity ie console output during our operations. |
Methods
showHistory(extension_type = None)
Returns a Dictionary of the Files that were been Moved. By default, showHistory() returns dictionary of the all the file types if no argument has been passed.
Parameters | Description |
---|---|
extension_type | Can be anything among these - ['Documents', 'Pictures', 'Musics', 'Videos', 'Others'] |
if extension_type is passed as an argument, then a dictionary containing moved files will be returned having extension_type
as type.
Sample Output of showHistory()
:
About
Categorise your files into Pictures, Documents, Music, Videos! (Support for more categories will be added if Required).
Pictures will be moved to /home/$user/Pictures
for Debian-based systems or c:\user\username\Pictures
for Windows, same goes for Documents, Music, Videos etc to their respective folders.
All the classes/methods will be imported under the package directory_organizer
.
Further File Types will be added to Existing Types to Widen Support.
Note :
- By Default, Directory Organizer considers base
Downloads
Directory of your OS. - If the File-type doesn't match with either of Pictures/Documents/Videos/Music File extensions, then it'll be moved to
Others
Directory.
This Package has been developed collectively by @rahulbordoloi and @SouravMzdr which has been published to PyPI.
Installation
Run the following command on your terminal to install directory_organizer
:
1 . Installing the Package using pip
:
pip install directory_organizer
OR
pip3 install directory_organizer
2 . Cloning the Repository:
git clone https://github.com/rahulbordoloi/Directory-Organizer/
cd directory_organizer
pip install -e .
Usage
Run this Script in order to move all the Files to their respective type folders! [Default]
Outputs
1 . Selecting Directory and Output as DEFAULT
>>> from directory_organizer import organizer
>>> organizer()
Moving Document File Extensions ...
Moving Picture File Extensions ...
Moving Music File Extensions ...
No Videos to Move!
Moving Other File Extensions ...
Time Elapsed : 0.2 seconds
2 . Selecting a Random
Directory with Output True
.
>>> from directory_organizer import organizer
>>> object = organizer('C:\Personal\Work\Directory Organizer\Test\Random', True)
Moving Document File Extensions ...
7 Files moved to Documents!
5_6084888091904966894.pdf
5_6293939556248977731.pdf
Artemis.pdf
AWS Bucket.csv
certificate.pdf
datasets_1111_2005_kidney_disease.csv
sparsehc-a-memory-efficient-online-hierarchical-clustering-algorithm.pdf
No Pictures to Move!
Moving Music File Extensions ...
1 Files moved to Musics!
In the end - Linkin Park (with).mp3
Moving Video File Extensions ...
1 Files moved to Videos!
Narcos - Main Trailer - Netflix [HD].mp4
Moving Other File Extensions ...
2 Files moved to Others!
ngrok.exe
saved_model.pb
Time Elapsed : 0.13 seconds
Screenshots of Result
Before Organizing
:
After Organizing
:
Developing Directory Organizer
To install directory_organizer
, along with the tools you need to develop and run tests, and execute the following in your virtualenv:
$ pip install -e .[dev]
Security & Bugs
- As a security measure, this script WILL NOT access files located in any subdirectory unless explicitly stated.
- Files having the same name as in Source and Target will get Replaced. [Caution]
Contact Author(s)
Name : Rahul Bordoloi
Website : https://rahulbordoloi.me
Email : rahulbordoloi24@gmail.com
Name : Sourav Mazumdar
Email : souravmzdr@gmail.com
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for directory_organizer-1.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e26c0749fdb4c3f5733fc6a491cbea007cfca42f24344bff862126accc74aac5 |
|
MD5 | 4cb90b7adc41ee787370b836dea58f35 |
|
BLAKE2b-256 | 2e497829e0f8f3539eb80dc7f3075106da8ef64fecccef6dfb2591ce5716046b |
Hashes for directory_organizer-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 65827ca09fa42cd47eee88a0eeb9988d1755e960312d3972e51a717e9b99a65e |
|
MD5 | e07319013b7279c8a696b7e213986e62 |
|
BLAKE2b-256 | 7b070d7ba2d51bfceafef1ca2cc56883ae4d0fc88a05983588bc94d11a2e998b |