DEV Community

Bobo
Bobo

Posted on

Bulk Rename 1000+ Files in Seconds: A file-batch-toolkit Tutorial

Bulk Rename 1000+ Files in Seconds: A file-batch-toolkit Tutorial

Stop renaming files one by one. Whether you're organizing photos, cleaning up downloads, or sorting project files, file-batch-toolkit has your back.

Install

npm install -g file-batch-toolkit
Enter fullscreen mode Exit fullscreen mode

Batch Rename

batch rename ./downloads/ --pattern "screenshot" --replacement "screenshot_2024" --preview
Enter fullscreen mode Exit fullscreen mode

Use --preview to see what will happen before applying.

Organize by Type

batch organize ./messy-folder/ --by-type --dest ./organized/
Enter fullscreen mode Exit fullscreen mode

Find and Remove Duplicates

batch deduplicate ./photos/ --algorithm md5 --delete-duplicates
Enter fullscreen mode Exit fullscreen mode

Real Workflow: Photo Backup

# 1. Copy camera folder
# 2. Rename with dates
batch rename ./DCIM/ --pattern "IMG_" --replacement "Vacation_2024_"

# 3. Organize by month
batch organize ./DCIM/ --by-date --date-format YYYY-MM

# 4. Deduplicate
batch deduplicate ./DCIM/ --dry-run
Enter fullscreen mode Exit fullscreen mode

Visit us: https://www.tucaowall.vip/
Get free DigitalOcean credit: https://m.do.co/c/fc5cb7b29a0d
CLI Toolkit Pro - Unified CLI for devs: Buy $9.99

Never rename files manually again!

Top comments (0)