Pues Puedes Hacerlo por el con SHFileOperation.
Código: Seleccionar todo
Global Const $FO_MOVE = 0x0001
Global Const $FO_COPY = 0x0002
Global Const $FO_DELETE = 0x0003
Global Const $FO_RENAME = 0x0004
Global Const $FOF_MULTIDESTFILES = 0x0001
Global Const $FOF_CONFIRMMOUSE = 0x0002
Global Const $FOF_SILENT = 0x0004
Global Const $FOF_RENAMEONCOLLISION = 0x0008
Global Const $FOF_NOCONFIRMATION = 0x0010
Global Const $FOF_WANTMAPPINGHANDLE = 0x0020
Global Const $FOF_ALLOWUNDO = 0x0040
Global Const $FOF_FILESONLY = 0x0080
Global Const $FOF_SIMPLEPROGRESS = 0x0100
Global Const $FOF_NOCONFIRMMKDIR = 0x0200
Global Const $FOF_NOERRORUI = 0x0400
Global Const $FOF_NOCOPYSECURITYATTRIBS = 0x0800
Global Const $FOF_NORECURSION = 0x1000
Global Const $FOF_NO_CONNECTED_ELEMENTS = 0x2000
Global Const $FOF_WANTNUKEWARNING = 0x4000
Global Const $FOF_NORECURSEREPARSE = 0x8000
Func _CopyWithProgress($sFrom, $sTo)
Local $SHFILEOPSTRUCT
Local $pFrom
Local $pTo
Local $aDllRet
Local $nError = 0
Local $i
$SHFILEOPSTRUCT = DllStructCreate("align 1;hwnd;uint;ptr;ptr;ushort;bool;ptr;ptr")
If @error Then Return False
; hwnd
DllStructSetData($SHFILEOPSTRUCT, 1, 0)
; wFunc
DllStructSetData($SHFILEOPSTRUCT, 2, $FO_COPY)
; pFrom
$pFrom = DllStructCreate("char[" & StringLen($sFrom)+2 & "]")
; pFrom will now be null-terminated at StringLen($sFrom)+1
DllStructSetData($pFrom, 1, $sFrom)
For $i = 1 To StringLen($sFrom)+2
If DllStructGetData($pFrom, 1, $i) = 10 Then DllStructSetData($pFrom, 1, 0, $i)
Next
; We need a second null at the end
DllStructSetData($pFrom, 1, 0, StringLen($sFrom)+2)
DllStructSetData($SHFILEOPSTRUCT, 3, DllStructGetPtr($pFrom))
; pTo
$pTo = DllStructCreate("char[" & StringLen($sTo)+2 & "]")
; pTo will now be null-terminated at StringLen($sTo)+1
DllStructSetData($pTo, 1, $sTo)
; We need a second null at the end
DllStructSetData($pTo, 1, 0, StringLen($sTo)+2)
DllStructSetData($SHFILEOPSTRUCT, 4, DllStructGetPtr($pTo))
; fFlags
DllStructSetData($SHFILEOPSTRUCT, 5, BitOR($FOF_NOCONFIRMMKDIR, _
$FOF_NOCONFIRMATION, _
$FOF_NOERRORUI))
; fAnyOperationsAborted
DllStructSetData($SHFILEOPSTRUCT, 6, 0)
; hNameMappings
DllStructSetData($SHFILEOPSTRUCT, 7, 0)
; lpszProgressTitle
DllStructSetData($SHFILEOPSTRUCT, 8, 0)
$aDllRet = DllCall("shell32.dll", "int", "SHFileOperation", "ptr", DllStructGetPtr($SHFILEOPSTRUCT))
If @error Or $aDllRet[0] <> 0 Then
$aDllRet = DllCall("kernel32.dll", "long", "GetLastError")
If Not @error Then $nError = $aDllRet[0]
EndIf
Dim $aborted = DllStructGetData($SHFILEOPSTRUCT, 6)
DllStructDelete($pFrom)
DllStructDelete($pTo)
DllStructDelete($SHFILEOPSTRUCT)
If $nError <> 0 Then
SetError($nError)
Return False
elseif $aborted Then
Return False
EndIf
Return True
EndFunc
Func DllStructDelete(ByRef $vStruct)
$vStruct = ""
EndFunc
;Llamada
_CopyWithProgress("D:\Softwares","C:\Documents and Settings\Dark\Escritorio\")
Saludos