Hey Jungs also ich bin schon ganz zu frieden mit dem tool,
wollte jetz das _MultiFileCopy durch normale DirCopy und FileCopy
ersetzen allerdings funktioniert das nicht so wirklich wie ich das will
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Version=Beta
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <GUIConstants.au3>
#include <MultiFileCopy.au3>
#include <Array.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("LAN Downloader - by Alexander Scherer", 849, 647, 218, 226)
$Group1 = GUICtrlCreateGroup("LAN Downloader ", 16, 24, 825, 617)
$spath = GUICtrlCreateInput("", 120, 48, 305, 21)
$dpath = GUICtrlCreateInput("Zielordner", 550, 48, 250, 21)
$Label2 = GUICtrlCreateLabel("Such Ordner:", 32, 48, 81, 20)
GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
$dig = GUICtrlCreateButton("DIG IT", 456, 48, 73, 25, 0)
$Group2 = GUICtrlCreateGroup("Dateien / Ordner ", 24, 88, 809, 505)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$check_all = GUICtrlCreateButton("Check All", 40, 608, 75, 25, 0)
$dlgoo = GUICtrlCreateButton("DL TIS SHiT", 152, 608, 75, 25, 0)
$exit = GUICtrlCreateButton("eXiT", 728, 608, 75, 25, 0)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Label1 = GUICtrlCreateLabel("AutoIT LAN Downloader by Alexander Scherer", 560, 8, 266, 17)
GUICtrlSetFont(-1, 8, 800, 4, "MS Sans Serif")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
$guichecked = 0
[/autoit][autoit][/autoit][autoit]While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $dig
[/autoit][autoit][/autoit][autoit]; Shows the filenames of all files in the current directory, note that "." and ".." are returned.
$search = FileFindFirstFile( GUICtrlRead($spath) & "\*.*" )
Dim $anzahl
Dim $summe
$high = 88
$left = 40
; Check if the search was successful
If $search = -1 Then
MsgBox(0, "Error", "No files/directories matched the search pattern")
Exit
EndIf
While 1
$file = FileFindNextFile($search)
If @error Then ExitLoop
$summe += 1
WEnd
; Close the search handle
FileClose($search)
$search = FileFindFirstFile( GUICtrlRead($spath) & "\*.*" )
[/autoit][autoit][/autoit][autoit]If $search = -1 Then
MsgBox(0, "Error", "No files/directories matched the search pattern")
Exit
EndIf
Dim $box[$summe+1]
Dim $files[$summe+1]
If $summe <> "" Then
For $i = 1 to $summe
GUICtrlDelete ($box[$i])
Next
EndIf
For $i = 1 to $summe
$file = FileFindNextFile($search)
If @error Then ExitLoop
;MsgBox(4096, "File:", $file)
$anzahl += 1
if $anzahl > 20 Then
$left += 232
$high = 88
$anzahl = 1
ElseIf $anzahl > 40 Then
$left = 496
$high = 88
EndIf
If $anzahl > 60 Then
MsgBox( 1, "ERROR", "Zu viele Dateien ( 60 Maximum )!")
Exit
EndIf
$high = 88 + $anzahl * 24
$box[$i] = GUICtrlCreateCheckbox($file, $left, $high, 200, 17)
$files[$i] = GUICtrlRead($spath) & "\" & $file
Next
; Close the search handle
FileClose($search)
Case $check_all
if $guichecked = 0 Then
For $i = 1 to $summe
GUICtrlSetState( $box[$i], $GUI_CHECKED )
$guichecked = 1
Next
Else
For $i = 1 to $summe
GUICtrlSetState( $box[$i], $GUI_UNCHECKED )
$guichecked = 0
Next
EndIf
Case $dlgoo
[/autoit][autoit][/autoit][autoit]Dim $aSource[$summe+1]
Dim $f
$f = 0
For $i = 1 to $summe
If GUICtrlRead ( $box[$i] ) = $GUI_CHECKED Then
$f += 1
$aSource[0] = $f
$aSource[$i] = $files[$i]
MsgBox(0,"",$files[$i])
EndIf
Next
;===Beispiel 3 (mehrere Dateien kopieren)=======================================
; Alle Dateien aus dem Array werden ins Zielverzeichnis kopiert
; Array[0] muss die Anzahl der zu kopierenden Dateien enthalten
$sDestinationPath = GUICtrlRead($dpath) & '\'; Zielpfad (wird ggf. erstellt)
GUISetState(@SW_HIDE, $Form1)
;_MultiFileCopy($aSource, $sDestinationPath, False)
_ArrayDisplay($aSource)
;; FILE / DIR COPY
[/autoit][autoit][/autoit][autoit]Dim $isdir
[/autoit][autoit][/autoit][autoit]For $i = 1 to $summe
$isdir = 0
If $aSource[$i] <> "" Then
$attrib = FileGetAttrib($aSource[$i])
If @error Then
MsgBox(4096,"Error", "Could not obtain file attributes.")
Exit
EndIf
If StringInStr($attrib, "D") Then
MsgBox(4096,"", "File is a Directory.")
$isdir = 1
EndIf
If $isdir = 1 Then
DirCopy($aSource[$i],$sDestinationPath)
TrayTip ( "Copy Dir", $aSource[$i], 10 )
Else
FileCopy($aSource[$i],$sDestinationPath)
TrayTip ( "Copy File", $aSource[$i], 10 )
EndIf
TrayTip ( "Finished File", $aSource[$i], 10 )
[/autoit][autoit][/autoit][autoit]EndIf
[/autoit][autoit][/autoit][autoit]Next
[/autoit][autoit][/autoit][autoit][/autoit][autoit]TrayTip ( "Finished", "all Files / Dirs have been finished", 10 )
[/autoit][autoit][/autoit][autoit][/autoit][autoit]For $i = 1 to $summe
GUICtrlDelete ($box[$i])
Next
;===============================================================================
[/autoit][autoit][/autoit][autoit]Case $exit
Exit
EndSwitch
WEnd
PS: ja ich weiß der code ist schlampig aber bin noch nicht so professionell im umgang mit au3 sry
das problem müsste irgendwo hier liegen:
[autoit]
;; FILE / DIR COPY
Dim $isdir
For $i = 1 to $summe
$isdir = 0
If $aSource[$i] <> "" Then
$attrib = FileGetAttrib($aSource[$i])
If @error Then
MsgBox(4096,"Error", "Could not obtain file attributes.")
Exit
EndIf
If StringInStr($attrib, "D") Then
MsgBox(4096,"", "File is a Directory.")
$isdir = 1
EndIf
If $isdir = 1 Then
DirCopy($aSource[$i],$sDestinationPath)
TrayTip ( "Copy Dir", $aSource[$i], 10 )
Else
FileCopy($aSource[$i],$sDestinationPath)
TrayTip ( "Copy File", $aSource[$i], 10 )
EndIf
TrayTip ( "Finished File", $aSource[$i], 10 )
EndIf
Next
TrayTip ( "Finished", "all Files / Dirs have been finished", 10 )
gruß nova
PPS: jetz hab ich ganz vergessen zu sagen was nicht funktioniert, also er sagt mir immer das alle "finished" wäre aber er tut gar nichts ( Copy bezogen, der rest funktioniert supa )