; ----------------------------------------------- #include #include #include #include #include ; ----------------------------------------------- Local $hGUI=GUICreate("RML Labs Session Development Main Menu", 655, 335) GUISetFont(12, $FW_BOLD, $GUI_FONTNORMAL, "Calibri") ; ----------------- Local $BUP_SESSION_DATA=GUICtrlCreateButton("Bup_Sess_Data", 175, 230, 150, 25) Local $Exit=GUICtrlCreateButton("Exit", 485, 20, 150, 25) ; ----------------------------------------------- GUISetState(@SW_SHOW, $hGUI) $Pic1=GUICtrlCreatePic("D:\Install\System_Data\Images\bg_img.bmp", 485, 50, 150, 265) ; ----------------------------------------------- While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE, $Exit ExitLoop Case $BUP_SESSION_DATA BUP_SESSION_DATA() EndSwitch WEnd ; ----------------------------------------------- Func BUP_SESSION_DATA() $MyBox=MsgBox(4, "Backup Session Data?", "Select Yes or No...") ;------ If $MyBox == 6 Then ; SECTION A1: First, select an .edl data file Local Const $sMessage1="Select .edl file" Local $SRC1="G:\Session_Master\Show" Local $sFileOpenDialog1=FileOpenDialog($sMessage1, $SRC1, "Session File (*.edl)", BitOr($FD_FILEMUSTEXIST, $FD_MULTISELECT)) ; ----------------- ; SECTION A2: Second, select a .wpd data file Local Const $sMessage2="Select .wpd file" Local $SRC2="F:\Audio" Local $sFileOpenDialog2=FileOpenDialog($sMessage2, $SRC2, "Wave File (*.wpd)", BitOr($FD_FILEMUSTEXIST, $FD_MULTISELECT)) ; ----------------- ; SECTION B: Third, select the destination folder location for both data files Local Const $sMessage3="Select a Destination folder..." Local $_Selected_Folder=FileSelectFolder($sMessage3, "E:\Master_Backup") ; ----------------- ; SECTION C CopyFiles($sFileOpenDialog1, $_Selected_Folder) CopyFiles($sFileOpenDialog2, $_Selected_Folder) ; ----------------- ElseIf $MyBox == 7 Then MsgBox(0,"NOTICE","Exiting the function......", 1) EndIf EndFunc ; ----------------- Func CopyFiles($sFileOpenDialog, $sDestination) If StringInStr($sFileOpenDialog, "|") Then Local $aFileSplit = StringSplit($sFileOpenDialog, "|") For $i = 2 To $aFileSplit[0] FileCopy($aFileSplit[1] & "\" & $aFileSplit[$i], $sDestination) Next Else FileCopy($sFileOpenDialog, $sDestination) EndIf EndFunc ; -----------------------------------------------