rename files

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
sbrady19
Posts: 337
Joined: 12 Apr 2018, 05:22
Location: Central Florida
Contact:

rename files

07 Dec 2018, 08:24

here is what I did to rename files in a folder. You need to copy as text the path of the folder.
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

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Noitalommi_2, ulysim and 315 guests