Skip to content

About

Organize and rename files by their type.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rename By Type | Dump Folder Organizer

A simple Node.js utility to classify and rename files in a folder.

Table of Contents
  1. About The Project
  2. Built With
  3. Getting Started
  4. Usage
  5. Future Work
  6. License
  7. Contact

About The Project

This utility helps organize your cluttered dump/ folder by classifying files into type-based subdirectories and renaming them in a clean, indexed format.

Organized folders look like this:

dump/
├── _images_/
├── _videos_/
├── _audio_/
├── _documents_/
└── _others_/

(back to top)

Built With

  • Node.js

(back to top)

Getting Started

Prerequisites

Make sure you have Node.js installed.

node -v

Installation

  1. Clone the repo
git clone https://github.com/siddharthaasal/rename-by-type.git
cd rename-by-type
  1. Open index.js and set the dumpFolderPath variable (near the top of the file) to the path of your target folder. This is the directory whose files you want to organize.

  2. Run the script:

node index.js

(back to top)

Usage

  • Automatically classifies files into:

    • _images_: jpg, jpeg, png, gif
    • _videos_: mp4, mkv, avi, mov
    • _audio_: mp3, wav, flac
    • _documents_: pdf, doc, docx, txt
    • _others_: anything else
  • Files are renamed to:

01_images.jpg
02_images.jpg
...

(back to top)

Future Work

  • Use path.join() for OS-independent compatibility
  • Add support for async file operations
  • Prevent overwriting by checking if renamed file exists
  • Sanitize filenames to remove special characters
  • Add CLI interface (e.g., --dry-run, --input, --verbose)
  • Log actions and errors to a log file
  • Handle files without extensions

(back to top)

License

Distributed under the MIT License.

(back to top)

Contact

Siddharth Aasal - LinkedIn | Mail

Project Link: https://github.com/siddharthaasal/rename-by-type

(back to top)

About

Organize and rename files by their type.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages