Moin,
ich lasse mir alle dateien mit bestimmten endungen auflisten damit ich diese kopieren kann, das funktioniert wunderbar und wird mir im array auch angezeigt.
jedoch crashed es dann in der for schleife und sagt, dass es das element nicht gibt.
bin ich komplett deppers?
Code
Func copyall()
$drive = StringTrimRight(@WindowsDir, 8)
$files = _FileListToArrayRec($drive & "\", "*|Users;Programme;program files;Program Files (x86);windows;pagefile;System Volume Information;Temporary*;$Recycle*;", 2, 0, 0, 1)
For $i = 1 To $files[0]
$path = _FileListToArrayRec($drive & "\" & $files[$i], "*.xls;*.doc;*.pst;*.ppt;*.mmp;*.mpp;*vsd;*.frm;*.vba;*.vbs;*.url;*.one;*.onetoc", 1, 1, 0, 1)
_ArrayDisplay($path, $files[$i])
For $o = 1 To $path[0] ; <---- crash hier, da $path[0] leer obwohl $path[0] = 2 ?
FileCopy($drive & "\" & $files[$i] & $path[$o], $clines[1] & @ComputerName & "\" & $files[$i] & $path[$o])
Next
Next
EndFunc ;==>copyall
Alles anzeigen
d.h doch $path[$o] sind befüllt oder?
For $o = 1 To $path[0] ; <---- crash hier, da $path[0] leer obwohl $path[0] = 2 ?
Zitat"C:\Users\e1103468\Desktop\Scripte\Supercopy\supercopy.au3" (75) : ==> Subscript used on non-accessible variable.:
For $o = 1 To $path[0]
For $o = 1 To $path^ ERROR
->11:29:03 AutoIt3.exe ended.rc:1
Danke...