Opt("TrayIconDebug", 1) $S_running = "find-copy-photos" ;name the script If WinExists($S_running) Then MsgBox(0, "AutoIt", "The script to find and copy photos is already running") Exit EndIf AutoItWinSetTitle($S_running) $FileName = FileOpenDialog("Select the file that contains the list of photos to find & copy", "C:\temp\", "Text File (*.txt)") If @error Then Exit $FileNameArray = StringSplit(FileRead($FileName), @CRLF, 1) $PhotoFolder = FileSelectFolder("Select the top level folder that contains the photos.", "") If @error Then Exit $search = FileFindFirstFile($PhotoFolder & "\*.*") If $search = -1 Then MsgBox(0, "Error", "No files/directories matched the search pattern") Exit EndIf While 1 Local $file = FileFindNextFile($search) If @error Then ExitLoop For $i = 1 To $FileNameArray[0] If $file = $FileNameArray[$i] Then FileCopy($PhotoFolder & "\" & $file, @DesktopDir & "\output\", 8) $FileNameArray[$i] = "" EndIf Next WEnd For $i = 1 To $FileNameArray[0] If $FileNameArray[$i] <> "" Then InputBox("Error", "Could not find:", $FileNameArray[$i]) If @error = 1 Then Exit EndIf Next Run("explorer.exe " & @DesktopDir & "\output\")