<b>VBScript若何调用RAR压缩文件</b>[网站编程]
本文“<b>VBScript若何调用RAR压缩文件</b>[网站编程]”是由七道奇为您精心收集,来源于网络转载,文章版权归文章作者所有,本站不对其观点以及内容做任何评价,请读者自行判断,以下是其具体内容:
VBScript若何实现调用RAR紧缩文件?以下是代码,可参考!
'------------------------------------------------------------
'Backup Data File and Rar File
'
'Create Date: 2009-11-05
'Author: Wei_Zhu
'Chage Log:
'Last Chage Date: 2009-11-05
'-------------------------------------------------------------
BackUpFile("D:\Data")
Function BackUpFile(lstg_folder_name)
Dim fso, f, f1,fc,s,folder
Set fso=CreateObject("Scripting.FileSystemObject")
folder=fso.getfolder(ws.currentdirectory)
Set f=fso.GetFolder(lstg_folder_name)
Set fc=f.files
For Each f1 in fc
dim lf
lf=lstg_folder_name& "\" & f1.name
RarFile lf
Next
End Function
'----Rar File-----
Function RarBackupFile(lastg_file_name)
'/*Rar Program in RarComponent Folder, Program Name is Rar.exe
' Rar Source: Folder + File
' Rar Target: Folder + Target Name .rar */
Dim WshShell
Set WshShell = CreateObject("WScript.Shell")
Set fso=CreateObject("Scripting.FileSystemObject")
folder=fso.getfolder(WshShell.currentdirectory)
RarComponent =folder&"\RarComponent\rar.exe"
SourceFile = lastg_file_name
TargetFile = "D:\data\test.rar"
WshShell.Run RarComponent&" a -ep1 "&TargetFile&" "&SourceFile,0
End Function
以上是“<b>VBScript若何调用RAR压缩文件</b>[网站编程]”的内容,如果你对以上该文章内容感兴趣,你可以看看七道奇为您推荐以下文章:
本文地址: | 与您的QQ/BBS好友分享! |