Monthly Archives: May 2017

Installing classifier- A file sorter for Linux

Linux Format LXF244 contains a short review of Classifier, a useful piece of software for sorting files into their different types. The program can be installed through the Python pip repository via the Terminal (CTRL+ALT+T): The instructions in the magazine are simply:
sudo pip install classifier


However, there are a couple of pre-requisites required in order to make this work 'out of the box' (I'm using Mint 18).

I had already installed Python, but if you need to do this:

sudo apt-get install Python

Pip is installed with Python, but may need to be upgraded. NB the code suggested here did not work.

pip install --upgrade pip

Then you can install Classifier:

sudo pip install classifier

Help can be obtained via:

classifier --help

Or

classifier -h

This brings up the following text in the Terminal:
All commands start with classifier:

-h, --help show this help message and exit
-st SPECIFIC_TYPES [SPECIFIC_TYPES ...], --specific-types SPECIFIC_TYPES [SPECIFIC_TYPES ...]
Move all file extensions, given in the args list, in
the current directory into the Specific Folder
-sf SPECIFIC_FOLDER, --specific-folder SPECIFIC_FOLDER
Folder to move Specific File Type
-o OUTPUT, --output OUTPUT
Main directory to put organized folders
-d DIRECTORY, --directory DIRECTORY
The directory whose files to classify
-dt, --date Organize files by creation date

I have used the basic function to sort out my downloads folder which contains a enormous variety of files: In my case:

classifier -d Downloads

Apparently, there is no undo here so be careful.

This sorted my Downloads into various subfolders according to their type.

  • Twitter
  • del.icio.us
  • Digg
  • Facebook
  • Technorati
  • Reddit
  • Yahoo Buzz
  • StumbleUpon