#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <MsgBoxConstants.au3>

$input = '!-Teil012_SD.rcp'

GUICreate(" My GUI input acceptfile", 320, 120)
$idInput = GUICtrlCreateInput($input, 10, 5, 300, 20)
$idBtn = GUICtrlCreateButton("Ok", 40, 75, 60, 20, $BS_DEFPUSHBUTTON)

GUISetState(@SW_SHOW)

; Loop until the user exits.
While 1
	Switch GUIGetMsg()
		Case $GUI_EVENT_CLOSE
			ExitLoop
		Case $idBtn
			$input = GUICtrlRead($idInput)
			$sTeil = StringMid($input, 3)
			$sSource = "C:\Quellordner\" & StringTrimRight($sTeil, 4) & "\" & $sTeil
			$sDest = "C:\Zielordner\" & $sTeil
			MsgBox(0, "Test", $sSource & @CRLF & @CRLF & $sDest)
			;FileDelete($sDest)
			;FileCopy($sSource,$sDest,1)	;1 = Überschreibmodus ==> macht das vorhergehende löschen überflüssig
	EndSwitch
WEnd

