Last active
December 29, 2020 17:01
-
-
Save cope/e88f87fbfb7e19d455d273fc0b5c03f4 to your computer and use it in GitHub Desktop.
This file contains 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'); | |
fs.readdirSync('./').forEach(file => { | |
if (file.endsWith('.mkv')) { | |
let clean = file.split('.'); | |
let pos = clean.indexOf('720p'); | |
clean = clean.slice(0, pos).join(' ') + '.mkv'; | |
console.log(file, clean, pos); | |
fs.renameSync(file, clean); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment