Wir könnten Dir sicher helfen! Vorausgesetzt Du postest mal Dein Script.
Moin,
na sicher... der Code
Ich wollte nur mal erstmal einige Versuche unternehmen. Aber bis jetzt ist wohl so richtig noch nichts gescheites dabei entstanden.
Naja, ich habe tausend diverse Verzeichnisse, Variablen, Cases, etc...
Spoiler anzeigen
C
#include <Array.au3>
#include <File.au3>
#include <FileConstants.au3>
#include <Constants.au3>
;; => VARIABLEN BEGINN
$sSource = InputBox('Update-Quelle','Bitte den Pfad zur Updatequelle angeben.'&@CRLF&@CRLF&'Standpfad hierbei:','K:\Installationsquelle\'&@YEAR&'\',"",400,150)
$sDestination = InputBox('Update-Ziel','Bitte Installation angeben.'&@CRLF&@CRLF&'Standpfad hierbei:','S:\InstOrdner\',"",400,150)
;; => VARIABLEN ENDE
MsgBox(260,"Angaben","Stimmt der Quellpfad? "&$sSource&@CRLF&@CRLF&"Angaben","Stimmt der Zielpfad? "&$sDestination)
$aFiles = _FileListToArray($sSource)
If (Not IsArray($aFiles) and (@Error=1)) Then
MsgBox (0,"","No Files\Folders Found.")
Exit
EndIf
; Laufwerke Mappen
$sLwK01 = '\\vfilerXX\Ziel01\'
$sLwK02 = '\\vfilerXX\Ziel02\'
$sLwK04 = '\\vfilerXX\Ziel04\'
$sLwK20 = '\\vfilerXX\Ziel20\'
; Graphical User Interface#include <ButtonConstants.au3>
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
$Form1_1 = GUICreate("Form1", 613, 657, 281, 114)
$K01 = GUICtrlCreateCheckbox("K01", 32, 72, 129, 33)
$K02 = GUICtrlCreateCheckbox("K02", 32, 104, 129, 25)
$K04 = GUICtrlCreateCheckbox("K04", 32, 128, 129, 25)
$K20 = GUICtrlCreateCheckbox("K20", 32, 152, 129, 25)
$K01g = GUICtrlCreateCheckbox("K01g", 176, 72, 129, 33)
$K02g = GUICtrlCreateCheckbox("K02g", 176, 104, 129, 25)
$K04g = GUICtrlCreateCheckbox("K04g", 176, 128, 129, 25)
$K20g = GUICtrlCreateCheckbox("K20g", 176, 152, 129, 25)
$start = GUICtrlCreateButton("start", 360, 168, 185, 73)
GUICtrlSetFont(-1, 15, 400, 0, "MS Sans Serif")
$check = GUICtrlCreateButton("check", 360, 272, 185, 73)
GUICtrlSetFont(-1, 15, 400, 0, "MS Sans Serif")
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $start
If GUICtrlRead($K01) = $GUI_CHECKED Then
DriveMapAdd("S:", $sLwK01)
_schnittstelle
ElseIf GUICtrlRead($K01g) = $GUI_CHECKED Then
DriveMapAdd("S:", $sLwK01 & 'g\')
_schnittstelle
#comments-start
Hier sollte eigentlich geprüft werden, ob und welche Checkboxen aktiv sind
und im Anschluss das Laufwerk und der PFad gemappt werden.
Danach müsste die Func _schittstelle aufgerufen werden.
#comments-end
EndIf
; Case $GESCH
EndSwitch
WEnd
Func schnittstelle()
; DriveMapAdd("S:",)
FileDelete($sDestination & '\*.jar')
For $x=1 To UBound($aFiles,1)-1
If FileExists($sDestination &' \' & $x) Then
FileDelete($x)
FileCopy($sSource & '\' & $x, $sDestination & '\' & $x,8)
Else
MsgBox(256,"Error","Datei "& $x &" existiert nicht.")
EndIf
MsgBox(256,"Name",'Dateiname: ' & $aFiles[$x])
Next
DriveMapDel("S:")
EndFunc
Alles anzeigen
Ich lege mich erstmal aufs Ohr - vielleicht hilft das ja weiter.
Soweit schonmal Danke für das Interesse eurerseits.