Hallo MehmeX!
Ist nicht böse gemeint, aber das geht auch kürzer:
Spoiler anzeigen
#include <Array.au3>
$array = _FileGetInfo('C:\Programme\AutoIt3\AutoIt3.exe', 0, 1)
_ArrayDisplay($array)
Func _FileGetInfo($sPath, $iSizeFormat = 0, $iTimeFormat = 0)
If Not FileExists($sPath) Then Return SetError(1, 0, 0)
If $iSizeFormat < 0 Or $iSizeFormat > 3 Then $iSizeFormat = 0
If $iTimeFormat < 0 Or $iTimeFormat > 2 Then $iTimeFormat = 0
Local $aSize[4] = [' Byte(s)', ' KByte(s)', ' MByte(s)', ' GByte(s)']
Local $aOut[5] = [ _
StringRegExpReplace($sPath, '.*\\(.*)\.*.*', '$1'), _ ; Dateiname
StringRegExpReplace($sPath, '(.+\\).*\.*.*', '$1'), _ ; Dateipfad
Round(FileGetSize($sPath) / 1024 ^ $iSizeFormat, 2) & $aSize[$iSizeFormat], _ ; Dateigröße
FileGetVersion($sPath), _ ; Dateiversion
StringRegExpReplace(FileGetTime($sPath, $iTimeFormat, 1), '(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})', '$3.$2.$1 $4:$5:$6')] ; Dateidatum
Return $aOut
EndFunc
Ich will Dir nur mal zeigen, dass man manches vereinfachen kann. ![]()