dim filename,wshshell,fs,mycommandfilename=cstr(now)+".rar"
mycommand="rar a "+filename+" 要压缩的文件名或目录名"
set wshshell = wscript.createobject("wscript.shell")
set fs=createobject("scripting.filesystemobject")
if fs.fileexists(filename) then
fs.deletefile filename,true
end
if wshshell.run mycommand
将以上文件另存为一个 .vbs添加计划任务按你说需要的时间运行.vbs 如每个礼拜一次
或每个月一次等计划任务会自动压缩你指定的目录.生成一个日期文件名.rar