A basic hack to organize files in a folder. Categorizes different files in corresponding folders.
Currently very basic utility.
Working:
How to run:
Add the path of the directory(file_organizer) to PATH variable in linux.
Change the directory to one which you want to organize
Then do ruby file_organizer.rb to run
Or to make it executable do chmod +x file_organizer.rb
Then you can run as ./file_organizer.rb
Follow this to make it a executable script: http://commandercoriander.net/blog/2013/02/16/making-a-ruby-script-executable/
Then you can simple run with typing file_organizer
Choose the option and see the results. Two options:
- Press 1: Manually enter file extensions
eg: pdf,doc,mp3
The list should be comma seperated. - Press 2: Organize everything.
Requirements:
Ruby 2.1
To do:
- Command line interface
- Addition of more type of files
- Currently not handling any exceptions.