;https://www.autoitscript.com/forum/topic/157261-rename-all-files-in-a-folder-in-numerical-order/?do=findComment&comment=1139026 ; ----------------------------------------------- #include ; ----------------------------------------------- Opt("MustDeclareVars", 1) ; ----------------------------------------------- _RenameAudioData() ; ----------------------------------------------- Func _RenameAudioData() Local $sPathToFiles = "I:\Live_Rig\Scripts\Development\_RenameAudioData\Audio\" ; Path to text file would, I expect, go here? ;Local $sPathToText = "I:\Live_Rig\Scripts\Development\_RenameAudioData\FileListing.txt" Local $newFileName = 1000 Local $aFilesToRename = "" ; ----------------------------------------------- ; Get file names to rename $aFilesToRename = _FileListToArray($sPathToFiles, "*.*", 1) ; ----------------- ; Loop through file names to Rename For $i = 1 To $aFilesToRename[0] ; Increment new file name by 1 with each pass of loop. 1001.jpg, 1002.jpg etc ; The reading of the FileListing.txt would, I expect again, to go here? ;[coding] $newFileName += 1 ; ----------------- ; Rename files FileMove($sPathToFiles & $aFilesToRename[$i], $sPathToFiles & String($newFileName) & ".*", 0) Next EndFunc ;==>_RenameAudioData ; -----------------------------------------------