Last active
August 12, 2017 21:05
-
-
Save mashingan/f536b93f848a302c694a06c8e403c3f3 to your computer and use it in GitHub Desktop.
Rename files with WSH script
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
// run it with | |
// > wscript rename.js | |
// in the folder where the script resides | |
// | |
// or double-click it | |
var script = WScript.CreateObject("WScript.Shell"); | |
var fso = WScript.CreateObject("Scripting.FileSystemObject"); | |
for (var i = 28; i < 100; i++) { | |
var file = fso.GetFile('pg' + i + '.png'); | |
file.Name = 'pg0' + i + '.png'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment