Skip to main content

Utility Package that organizes and moves the specific file types to its type Specific Directories

Project description

Directory Organizer Package

Setup Automated Test passing Python Version PyPI version Last Commit Open Source Love png2

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 All Platform.

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 operations.
verbose Controls the verbosity ie console output during our operations.

Methods

organizer.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', 'Music', 'Videos', 'Archived', 'Programming', Others']

if extension_type is passed as an argument, then a dictionary containing moved files will be returned having extension_type as type.


organizer.showExtensions(extension_type = None)
  • Returns a dictionary of the files extensions that are been supported by the Package currently.
    By default, showExtensions() returns dictionary of the all the file extension types if no argument has been passed.
Parameters Description
extension_type Can be anything among these - ['Documents', 'Pictures', 'Music', 'Videos', 'Archived', 'Programming', Others']

if extension_type is passed as an argument, then a dictionary containing all file extensions having extension_type as type will be returned .


organizer.__version__
  • Returns the current package version number.

About

Categorise your files into Pictures, Documents, Music, Videos, Archived, Programming or as Others!

Pictures will be moved to /home/$user/Pictures for Unix-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/Archived/Programming 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]

# Importing Libraries
from directory_organizer import organizer

# Main Method
if __name__ == '__main__':
    organizer()

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 Archived File Extensions ...
Moving Programming File Extensions ...
Moving Other File Extensions ...
Time Elapsed :  0.22 seconds

2 . Selecting a Random Directory with Output True.

>>> from directory_organizer import organizer
>>> organizer('C:\Personal\Work\Directory Organizer\Test\Random', True)
Moving Document File Extensions ...
6 Files moved to Documents!
5_6084888091904966894.pdf
5_6293939556248977731.pdf
798073238.pdf
AWS Bucket.csv
B275D17ApplicationForm.pdf
datasets_1111_2005_kidney_disease.csv
Moving Picture File Extensions ...
2 Files moved to Pictures!
About ME.png
_MG_8632 copy.jpg
No Music Files to Move!
Moving Video File Extensions ...
1 Files moved to Videos!
Narcos - Main Trailer - Netflix [HD].mp4
Moving Archived File Extensions ...
1 Files moved to Archived!
one-dark-theme-5.1.1.zip
Moving Programming File Extensions ...
5 Files moved to Programming!
11263_Good_Bad_Customers.ipynb
11263_HR_Analytics.ipynb
Kidney_Disease.ipynb
monocai.jar
saved_model.pb
Moving Other File Extensions ...
2 Files moved to Others!
ngrok.exe
python-3.8.6.exe
Time Elapsed :  0.07 seconds

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

forthebadge made-with-python ForTheBadge built-with-love

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

directory_organizer-1.0.5.tar.gz (29.6 kB view details)

Uploaded Source

Built Distribution

directory_organizer-1.0.5-py3-none-any.whl (20.6 kB view details)

Uploaded Python 3

File details

Details for the file directory_organizer-1.0.5.tar.gz.

File metadata

  • Download URL: directory_organizer-1.0.5.tar.gz
  • Upload date:
  • Size: 29.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.7.6

File hashes

Hashes for directory_organizer-1.0.5.tar.gz
Algorithm Hash digest
SHA256 6d05808a6f80e184e73a114b3541cef445a11679ea40075e3502ea02e7708c3f
MD5 4e9d82b36b45b62b0c9f9dd56401fa81
BLAKE2b-256 4c4f0e2d8079c04048aa08d0e0601722316cc5d512d9763600a007ca0ea5e5dc

See more details on using hashes here.

File details

Details for the file directory_organizer-1.0.5-py3-none-any.whl.

File metadata

  • Download URL: directory_organizer-1.0.5-py3-none-any.whl
  • Upload date:
  • Size: 20.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.7.6

File hashes

Hashes for directory_organizer-1.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 cd53b2134a66915e7b5c3403bba9002a3ad1edd8555ce9e9ffcb299d767a8133
MD5 e1d8fb356ba07df1a49a566fc5ad8bb5
BLAKE2b-256 7526a24e987146e8896856446143aea0cde6a43a2627a1ca6fe1af9daf955346

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page