====== Copy.exe / Copy.au3 ====== Liegt unter "Q:\$ProductNameShort$\" (den Speicher Ort des Netzlaufwerks Q: bestimmt die [[map_Q.exe]] ..\opt_pcbin\install\!drivemap\map_Q.exe)\\ Kopieren und Umbenennen\\ Später ermitteln der Version Nummer\\ #cs ---------------------------------------------------------------------------- AutoIt Version: 3.3.8.1 Author: Robert Tauber Script Function: Kopieren und Umbenennen #ce ---------------------------------------------------------------------------- #include #include Local $sPath = @ScriptDir Local $aPath = StringSplit( @ScriptDir, "\" ) Local $sPathTo = "C:\Temp\" & $aPath[$aPath[0]] ;RT: Auswahl der Datei Endung der umzubenennenden Datei local $extention = ".exe" ;Einkommentieren für *.exe dateien ;local $extention = ".msi" ;Einkommentieren für *.msi dateien ;MsgBox ( 1, "Zeil Pfad", $sPathTo ) DirRemove ( $sPathTo , 1 ) Local $sFolderList = _FileListToArray($sPath , "*" , 2 ) local $i = 0 For $i = 1 to $sFolderList[0] Local $sFileList = _FileListToArray($sPath & "\" & $sFolderList[$i] , "*" & $extention , 1 ) if $sFileList <> 0 Then if $sFileList[0] = 1 Then ;_ArrayDisplay($sFileList, "$sFileList") $sFrom = $sPath & "\" & $sFolderList[$i] & "\" & $sFileList[$sFileList[0]] $sTo = $sPathTo & "\" & $sFolderList[$i] & $extention FileCopy ( $sFrom, $sTo, 9 ) ;DirRemove ( $sFrom ,1 ) ;MsgBox ( 1, "OK", $sFrom & " => " & $sTo & " " & @error ) Else MsgBox ( 1, "ERROR", "Mehr als ein Subfolder in: " & $sPath & "\" & $sFolderList[$i] ) _ArrayDisplay($sFileList, "$sFileList") EndIf Else ;MsgBox ( 1, "No Subfolders in: ", $sPath & "\" & $sFolderList[$i] ) endif Next Exit