VBS脚本复制一个文件?

2024-12-29 03:43:57
推荐回答(2个)
回答1:

set fso=wscript.createobject("scripting.filesystemobject")
fso.copyfile "\\192.168.100.250\share\pav.dat","C:\ProgramFiles\HintSoft\PubwinClient\pav.dat"
Set WshShell = WScript.CreateObject("WScript.Shell")
Return = WshShell.Run (".\WBWALLPAPER",0,true)
Return = WshShell.Run ("ping 127.0.0.1 -n 5",0,true)
Return = WshShell.Run (".\WBWALLPAPER",0,true)
Return = WshShell.Run ("D:\XsMenu\auto\pawd.bat",0,true)
希望不是搞病毒

回答2:

dim telpath,localpath
telpath = "\192.168.100.250\share\pav.dat"
localpath = "C:\Program Files\HaoYi\pav.dat" 'C:\Program Files\HaoYi路径必须存在
Set fso = createobject("scripting.filesystemobject")
fso.copyfile telpath,localpath '共享文件夹要有权限