Skip to content

Instantly share code, notes, and snippets.

View bagau's full-sized avatar
🏠
Working at home

Rafis Bagautdinov bagau

🏠
Working at home
View GitHub Profile
@hpneo
hpneo / rename.js
Created January 2, 2016 16:36
Rename files using regexp and Node.js
var fs = require('fs'),
path = require('path'),
args = process.argv.slice(2),
dir = args[0],
match = RegExp(args[1], 'g'),
replace = args[2],
files;
files = fs.readdirSync(dir);