本帖最后由 shqf 于 2010-1-10 20:14 编辑 $sDir = "C:\Program Files\Common Files"
$tDir = "E:\Test"
$sSize = DirGetSize($sDir)
ProgressOn("文件夹复制","正在复制" & StringLeft($sDir,14) & "...下所有文件","己复制0%")
Run(@ComSpec & " /c " & 'xcopy /s /e /y "'& $sDir &'" "'& $tDir & '"',"",@SW_HIDE)
While 1
$tSize=DirGetSize($tDir)
$Percent=Ceiling($tSize/$sSize*100)
If $Percent<100 then
ProgressSet($Percent,"已复制" & $Percent & "%")
Else
Sleep(1000)
ProgressSet("100","已复制100%")
Sleep(3000)
ProgressOff()
ExitLoop
EndIf
Sleep(200)
WEnd
拷贝文件用DOS中的Xcopy命令,原想用AU3当中的DirCopy函数,不知为啥总不行。请问有人知道吗?望赐教。 |