DirCopy() is a blocking function, it returns only when the copy operation has finished 100% (or failed ). If you want to implement progress feedback you'll have to do it on your own. Melba23's excellent comes in handy there ... #include <guiconstantsex.au3>
#include <progressconstants.au3>
; #include <array.au3>
#include <recfilelisttoarray.au3>
GUICreate("My GUI Progressbar", 220, 100, 100, 200)
$progressbar = GUICtrlCreateProgress(10, 30, 200, 20)
GUICtrlSetColor(-1, 32250); not working with Windows XP Style
$button = GUICtrlCreateButton("Start", 75, 70, 70, 20)
GUISetState()
Do
$msg = GUIGetMsg()
If $msg = $button Then
GUICtrlSetData($button, "Stop")
$a_Files = _RecFileListToArray(@WindowsDir & "Help", "*", 1, 1, 0, 1)
; _ArrayDisplay($a_Files)
For $i = 1 To $a_Files[0]
GUICtrlSetData($progressbar, ($i / $a_Files[0])*100)
FileCopy(@WindowsDir & "Help" & $a_Files[$i], @ScriptDir & "Help" & $a_Files[$i], 9)
Next
GUICtrlSetData($button, "Start")
EndIf
Until $msg = $GUI_EVENT_CLOSE