Last active
May 13, 2019 10:20
-
-
Save xcloudx01/51e258bdddc2816699d0a42956a2ee3f to your computer and use it in GitHub Desktop.
Change file extension of all files to the one specified
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
;Used to change ALL files in a folder to become a specified extension and to a new name followed by an incrementing number. | |
;It's been handy to use sometimes when software hasn't outputted a series of files correctly but manually renaming them would fix them. | |
;What name shall we give the new files? | |
NewName = picture | |
;What should their extention be? | |
Extention = .png | |
;Warning that this isnt an undoable action. | |
msgbox,4,Warning,This will rename and change ALL files to %Extention% in the current folder`nThis is not undo-able.`n`nDo you want to continue? | |
ifmsgbox,no | |
exitapp | |
;Used by the below loop to determine the picture number. | |
number = 00 | |
Loop * ;Run command on every single file on this folder. | |
{ | |
if A_LoopFileExt != ahk ;But don't run it on .ahk files | |
{ | |
number++ | |
Var := SubStr("00" . number, -2) | |
FileMove,%A_LoopFileName%,%NewName%%var%%Extention% | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment