Created
August 29, 2019 01:54
-
-
Save mauriciomassaia/5cf61eef897fed732bd14b30165f14a0 to your computer and use it in GitHub Desktop.
Move and Rename files exported from Adobe Media Encoder
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fs = require('fs') | |
const path = require('path') | |
const dir = path.join(__dirname, 'exported') | |
const files = fs.readdirSync(dir) | |
console.log(files) | |
files.forEach(file => { | |
const k = file.replace(/_[0-9]./gi, '.') | |
console.log(file, k) | |
fs.renameSync(path.join(dir, file), path.join(dir, k)) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment