What is a file-organizer?
User can specify their directory which contains random files, and this tool will create a new directory which contains those files based on their category like- media, archives, documents etc... in separate folders.
Technology used
- Node JS
Specific Node modules used
fs module
- unlinkSync()
- lstatSync().isFile()
- lstatSync().isDirectory()
- mkdirSync()
- readdirSync()
- existsSync()
- copyFileSync()
path module
- join()
- extname()
- basename()
Please consider reading about these modules first. Easy Node documentation can be a great resource.
Main 3 Functionalities of file-organizer CLI
- help
node main.js help
This command will display various commands which we can enter further for more operations.
- organize
node main.js organize "unorganized_folder_path"
This command will start organizing your scattered files present in unorganized_folder_path directory into different categories directory.
- tree
node main.js tree "folder_path"
It will create a tree visualization for all the subfolders and files inside folder_path directory.
Find the source code for the project.