Created
October 12, 2020 17:23
-
-
Save hernikplays/f78a50d63ef61bd8f79e5ad81df6eefd to your computer and use it in GitHub Desktop.
Quickly rename manga pages to number
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") | |
let folder = fs.readdirSync(".") | |
let i = 0; | |
folder.forEach((el)=>{ | |
if(el == "rename.js") return; | |
fs.renameSync("./"+el, (el<10)?"00"+i+".jpg":"0"+i+".jpg") | |
i++ | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment