A simple command-line tool built with Node.js that organizes files in a specified folder into categorized subfolders like Documents, Images, Videos, Code, and more β based on file extensions.
- Automatically organizes files by type
- Supports extensions for code, media, documents, and archives
- Creates folders if they don't exist
- Simple CLI usage
- Built with Node.js and native modules
| Category | Extensions |
|---|---|
| Images | .jpg, .jpeg, .png, .gif, .svg, .bmp |
| Documents | .pdf, .docx, .txt, .xlsx, .pptx |
| Music | .mp3, .wav, .flac, .aac |
| Videos | .mp4, .mkv, .avi, .mov |
| Archives | .zip, .rar, .7z, .tar |
| Code | .js, .ts, .html, .css, .json, .py, .java, .cpp, .c, .rb |
| Others | Anything not matched in the list above |
- Clone the repository:
git clone https://github.com/your-username/CLI-File-Organizer.git cd CLI-File-Organizer node app.js ./Downloads - Run the script with the folder you want to organize:
node app.js ./Downloads
β This will organize the contents of your Downloads folder into subfolders like Documents, Images, etc.