liminnet 发表于 2008-12-23 11:58:00
nonsmall 发表于 2008-12-23 13:36:00
<div id="code0" style="PADDING-RIGHT: 5px; PADDING-LEFT: 5px; PADDING-BOTTOM: 5px; PADDING-TOP: 5px; FONT-FAMILY: Courier New;">找了个资料 看来是没问题的 只需要用lisp改写</div><div style="PADDING-RIGHT: 5px; PADDING-LEFT: 5px; PADDING-BOTTOM: 5px; PADDING-TOP: 5px; FONT-FAMILY: Courier New;">'电脑爱好者专用版 编写:李兴旺 E-MAIL:wors_hip*163.com<br/><br/>MsgBox_Title_Text = "压缩的同步文件夹"<br/>CompressionFolder = InputBox("请输入即将压缩的文件夹路径:", MsgBox_Title_Text, "C:\PHP")<br/>If CompressionFolder = "" Then WScript.Quit<br/><br/>Function Interrogation(Contents)<br/> Dim intButton<br/> intButton = MsgBox(Contents, vbQuestion + vbYesNo, MsgBox_Title_Text )<br/> Interrogation = intButton = vbYes<br/>End Function<br/><br/>Function Compression(CompressionFolder)<br/> FileName = "压缩的同步文件夹.vbs"<br/> Set fso = CreateObject("Scripting.FileSystemObject")<br/> Destination = UCase(fso.GetFile(FileName).Drive) & "\"<br/> DIM cmd<br/> set fso= wscript.CreateObject("wscript.shell")<br/> cmd = "WINRAR A -IBCK -R " & Destination & "压缩的同步文件夹.RAR " & CompressionFolder<br/> fso.run cmd<br/> MsgBox "成功把 " & CompressionFolder & " 文件夹压缩到 " & Destination, vbInformation, MsgBox_Title_Text<br/>End Function<br/><br/>If Interrogation("定时压缩文件夹,同步数据到闪盘,请点击“是”!" & vbCrLf & "马上压缩文件夹,同步数据到闪盘,请点击“否”!") Then<br/> Savetime = InputBox("请输入24 小时格式 (hh:mm) 的时间:", MsgBox_Title_Text, "11:30")<br/> If Savetime = "" Then WScript.Quit<br/> MsgBox "已经运行了定时压缩文件夹,请不要重复运行!", vbExclamation, MsgBox_Title_Text<br/> Dim Check<br/> Check = True<br/> Do<br/> HHMM = FormatDateTime(Time, 4)<br/> If HHMM = Savetime Then<br/> Compression(CompressionFolder)<br/> Exit Do<br/> End If<br/> Loop Until Check = False<br/>Else<br/> Compression(CompressionFolder)<br/>End If</div>caoyin 发表于 2008-12-23 13:51:00
直接调用rar程序+参数liminnet 发表于 2008-12-23 14:07:00
xshrimp 发表于 2008-12-24 01:09:00
(startapp "C:\\Program Files\\WinRAR\\WinRAR.exe a c:\\压缩后文件名.rar" "c:\\压缩文件夹")liminnet 发表于 2008-12-24 09:22:00
caoyin 发表于 2008-12-24 09:35:00
查看winRAR帮助liminnet 发表于 2008-12-24 09:37:00
liminnet 发表于 2008-12-24 12:31:00
页:
[1]