#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <GUIListBox.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Include <File.au3>
#Include <Array.au3>
#Region ### START Koda GUI section ### Form=d:\4 study\autoit\code\ctl file copying utility\form2.kxf
$Gui = GUICreate("Server File Copying Utility", 619, 590, 249, 122)
GUISetBkColor(0x99B4D1)
$ListBox1 = GUICtrlCreateListView("Name|Size", 0, 144, 289, 240)
list(@AppDataCommonDir)
$Button1 = GUICtrlCreateButton(">", 4, 87, 30, 25)
$Button2 = GUICtrlCreateButton(">>", 260, 88, 31, 25)
$Button3 = GUICtrlCreateButton("<", 565, 89, 31, 25)
$Button4 = GUICtrlCreateButton("<<", 317, 90, 32, 25)
$ListBox2 = GUICtrlCreateList("", 312, 144, 289, 240)
GUICtrlSetData(-1, "")
$Input1 = GUICtrlCreateInput("Input1", 56, 48, 233, 21)
$Input2 = GUICtrlCreateInput("Input1", 376, 48, 225, 21)
$Label1 = GUICtrlCreateLabel("System1", 8, 8, 67, 17)
$Label2 = GUICtrlCreateLabel("System2", 320, 8, 43, 17)
$Label3 = GUICtrlCreateLabel("Location", 8, 48, 45, 17)
$Label4 = GUICtrlCreateLabel("Location", 320, 48, 45, 17)
$Edit1 = GUICtrlCreateEdit("", 0, 432, 609, 129)
GUICtrlSetData(-1, "Edit1")
$Log = GUICtrlCreateLabel("Log", 0, 408, 22, 17)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
;~ Case $Button1
;~ $Button1FileOpenDialog = FileOpenDialog('Select the Files in your server','','所有文件(*.*)',4)
EndSwitch
WEnd
;=====================Functions below=====================
Func list($dirname)
$FileList = _FileListToArray($dirname)
If UBound($FileList) <> '' Then
For $i = 1 To $FileList[0]
If StringInStr(FileGetAttrib($FileList[$i]), 'D') Then
GUICtrlCreateListViewItem($dirname & '\' & $FileList[$i] & '||文件夹', $ListBox1)
Else
GUICtrlCreateListViewItem($dirname & '\' & $FileList[$i] & '|' & FileGetSize($dirname & '\' & $FileList[$i]) & '|?', $ListBox1)
EndIf
Next
EndIf
Endfunc ;==>list
正在努力使用fileopendialog来代替要实现的功能 ,选择2个文件夹 或者2个文件然后复制到服务器的另外一个地方