当前位置: 移动技术网 > IT编程>脚本编程>VBScript > VBScript压缩单个文件为zip格式

VBScript压缩单个文件为zip格式

2017年12月08日  | 移动技术网IT编程  | 我要评论

大闸蟹养殖,免职证明,饮食图片

复制代码 代码如下:

on error resume next
dim fso,fp,oapp,targetfile
set fso=createobject("scripting.filesystemobject")
targetfile="d:\tmp.zip"
set fp=fso.opentextfile(targetfile,2,true)
fp.write chr(80) & chr(75) & chr(5) & chr(6) & string(18,0)
fp.close
set oapp=createobject("shell.application")
set fso=nothing
err.clear
oapp.namespace(targetfile).copyhere "c:\1.txt"
wscript.sleep 1000

如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复

相关文章:

验证码:
移动技术网