怎么样用wscript.shell把文件夹打包成rar文件
www.dimcax.com
怎么样用wscript.shell把文件夹打包成rar文件
以下文字是我在网上找到的,
本机是xp,装完系统和iis之后,默认wscript.shell是支持的,我可以用网上的那些代码生成rar文件
不知道用vlsp或lsp能否做到的呢??
d
找了个资料 看来是没问题的 只需要用lisp改写
'电脑爱好者专用版 编写:李兴旺 e-mail:wors_hip*163.com
msgbox_title_text = "压缩的同步文件夹"
compressionfolder = inputbox("请输入即将压缩的文件夹路径:", msgbox_title_text, "c:\php")
if compressionfolder = "" then wscript.quit
function interrogation(contents)
dim intbutton
intbutton = msgbox(contents, vbquestion + vbyesno, msgbox_title_text )
interrogation = intbutton = vbyes
end function
function compression(compressionfolder)
filename = "压缩的同步文件夹.vbs"
set fso = createobject("scripting.filesystemobject")
destination = ucase(fso.getfile(filename).drive) & "\"
dim cmd
set fso= wscript.createobject("wscript.shell")
cmd = "winrar a -ibck -r " & destination & "压缩的同步文件夹.rar " & compressionfolder
fso.run cmd
msgbox "成功把 " & compressionfolder & " 文件夹压缩到 " & destination, vbinformation, msgbox_title_text
end function
if interrogation("定时压缩文件夹,同步数据到闪盘,请点击“是”!" & vbcrlf & "马上压缩文件夹,同步数据到闪盘,请点击“否”!") then
savetime = inputbox("请输入24 小时格式 (hh:mm) 的时间:", msgbox_title_text, "11:30")
if savetime = "" then wscript.quit
msgbox "已经运行了定时压缩文件夹,请不要重复运行!", vbexclamation, msgbox_title_text
dim check
check = true
do
hhmm = formatdatetime(time, 4)
if hhmm = savetime then
compression(compressionfolder)
exit do
end if
loop until check = false
else
compression(compressionfolder)
end if
原创加密lisp真正的破解.原创lisp操作cad内置对话框.原创lisp直接调用win32 api.原创lisp开发小助手(代码自动生成器).原创vba语句->lisp语句解释器.原创lisp音乐播放器.原创lisp直接使用vba对话框.
直接调用rar程序+参数
d
有的吗,caoyin版主,参数在那有的呀
d
(startapp "c:\\program files\\winrar\\winrar.exe a c:\\压缩后文件名.rar" "c:\\压缩文件夹")
d
就是不知道a是什么参数来的