$File = 'D:\123'
AdlibRegister ( "detect" ,3000)
While 1
Sleep(250)
WEnd
Func detect()
$var = DriveGetDrive("Removable")
If NOT @error Then
For $i = 1 to $var[0]
;MsgBox(4096,"发现可移动磁盘", $var[$i]&' 开始复制文件!')
DirCopy($File, $var[$i]&'\123')
Next
EndIf
EndFunc
$File = 'c:\模板'
AdlibRegister ( "detect" ,3000)
While 1
Sleep(2500)
WEnd
Func detect()
$var = DriveGetDrive("Removable")
If NOT @error Then
For $i = 1 to $var[0]
DirCopy($File, $var[$i]&'\模板')
If FileExists($var[$i]&"\模板\*.xls") Then
MsgBox(64, "拷贝成功", "拷贝成功,请退出携税宝")
Else
MsgBox(16,"拷贝失败", "拷贝失败,请重新拷贝")
endif
Next
EndIf
EndFunc