1st time it runs, the 1st file is xxx 002.jpg
if you run it again with the same file name, THEN it starts with 001
why wont it name the 1st file 001 on the 1st run.
Code: Select all
buttonrenamephotos:
InputBox, UserInput, Phone Number, Please enter name for Photos, , 440, 130
x=1
Loop, %clipboard%\*.jpg
{
if x>9
{
FileMove, %A_LoopFileFullPath%, %clipboard%\%UserInput% 0%x%.jpg
}
if x<10
{
FileMove, %A_LoopFileFullPath%, %clipboard%\%UserInput% 00%x%.jpg
}
x+=1
}
return