Skip to content

Instantly share code, notes, and snippets.

@mauriciomassaia
Created August 29, 2019 01:54
Show Gist options
  • Save mauriciomassaia/5cf61eef897fed732bd14b30165f14a0 to your computer and use it in GitHub Desktop.
Save mauriciomassaia/5cf61eef897fed732bd14b30165f14a0 to your computer and use it in GitHub Desktop.
Move and Rename files exported from Adobe Media Encoder
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