Venator Posted December 13, 2023 Share Posted December 13, 2023 #include <File.au3> #include <Array.au3> $listOfFiles = _FileListToArray("C:\Users\Name\Desktop\Rename Project\Pics") $csvToArray = FileReadToArray("QR_15367250133055137865.csv") _ArrayDisplay($listOfFiles) $num = 2 For $num = 0 To UBound($csvToArray) - 1 $lastName = StringSplit($csvToArray[$num], ",") $lastNamers = StringLeft($lastName[1], 100) $lastNaming = StringReplace($lastNamers, """", "") $firstName = StringSplit($csvToArray[$num], ",") $firstNamers = StringLeft($firstName[2], 100) $firstNaming = StringReplace($firstNamers, """", "") $fullName = $lastNaming & " " & $firstNaming $iD = StringSplit($csvToArray[$num], ",") $iDS = StringLeft($iD[3], 100) $iDEAS = StringReplace($iDS, """", "") For $i = 0 To UBound($csvToArray) - 1 If (StringInStr($listOfFiles, $fullName)) Then FileMove("C:\Users\Name\Desktop\Rename Project\Pics\" & $listOfFiles, "C:\Users\Name\Desktop\Rename Project\Finished Folder\" & $iDEAS & ".jpg") EndIf Next Next Can't figure out how to get the file name that I want to rename into the new name, for example "13a3E" --> "9231", and the old file name would be the file that contains the full name. I also have the "Array variable has incorrect number of subscripts or subscript dimension range exceeded" that causes this to not work. (_ArrayDisplay was for testing) Link to comment Share on other sites More sharing options...
Nine Posted December 13, 2023 Share Posted December 13, 2023 Well $listOfFiles is an array and you use it without subscript... “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now