Skip to content

Instantly share code, notes, and snippets.

@xcloudx01
Created May 13, 2019 10:16
Show Gist options
  • Save xcloudx01/b31c647faa8284260b4bff3ad62cf4c6 to your computer and use it in GitHub Desktop.
Save xcloudx01/b31c647faa8284260b4bff3ad62cf4c6 to your computer and use it in GitHub Desktop.
Autohotkey Batch file renamer
;Will rename all files of the target file extension to a new name followed by a incrementing number. The script will load them in their current alphanumerical order and rename accordingly.
msgbox are you sure you want to continue?
exitapp
NewName = TYPE_YOUR_NEW_NAME_HERE_
SetFormat,FloatFast,4.4
number = 00
FileList =
Loop *.png ;Will rename ALL png files found in the script folder.
{
number++
Var := SubStr("00" . number, -2)
StringRight,Extention,A_LoopFileName,4
FileMove,%A_LoopFileName%,%NewName%%var%%Extention%
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment