呵呵 楼主在跟我找一样的东西
sanhen的东西 可惜路径不支持中文
Func _ExplorerCopy($source, $dest)
Global Const $FO_COPY = 0x0002
Global Const $FOF_ALLOWUNDO = 0x0040
Local $SHFILEOPSTRUCT, $source_struct, $dest_struct
$SHFILEOPSTRUCT = DllStructCreate("hwnd hWnd;uint wFunc;ptr pFrom;ptr pTo;int fFlags;" & _
"int fAnyOperationsAborted;ptr hNameMappings;ptr lpszProgressTitle")
$source_struct = DllStructCreate("char[" & StringLen($source) + 2 & "]")
DllStructSetData($source_struct, 1, $source)
DllStructSetData($source_struct, 1, 0, StringLen($source) + 2)
$dest_struct = DllStructCreate("char[" & StringLen($dest) + 2 & "]")
DllStructSetData($dest_struct, 1, $dest)
DllStructSetData($dest_struct, 1, 0, StringLen($dest) + 2)
DllStructSetData($SHFILEOPSTRUCT, "hWnd", 0)
DllStructSetData($SHFILEOPSTRUCT, "wFunc", $FO_COPY)
DllStructSetData($SHFILEOPSTRUCT, "pFrom", DllStructGetPtr($source_struct))
DllStructSetData($SHFILEOPSTRUCT, "pTo", DllStructGetPtr($dest_struct))
DllStructSetData($SHFILEOPSTRUCT, "fFlags", $FOF_ALLOWUNDO)
DllCall("shell32.dll", "int", "SHFileOperation", "ptr", DllStructGetPtr($SHFILEOPSTRUCT))
EndFunc ;==>_ExplorerCopy
|