A tool made for grouping files according to their extension. For example, all the .js files will be grouped in one folder, all the .txt files will be grouped in another folder and so on.
-
path : The Path module provides a way of working with directories and file paths.
-
fs : The Node.js file system module allows you to work with the file system on your computer.
-
shelljs : shellJS is a portable (Windows/Linux/OS X) implementation of Unix shell commands on top of the Node.js API.
`npm i shelljs`
clone or "download as a zip" this repository
to clone Type in terminal
git clone https://github.com/SJoshi7/group-similar-files.git
copy the index.js file from the repo to the folder you want to apply the grouping in.
run index File
node index.js
You get all the files grouped according to their respective extensions.
This is just a basic implementation of the concept.
Any kind of improvement would be highly appreciated. Give it a star if you liked it!