电驴(emule)下载完后自动关机的vbs脚本

将第一行引号内的路径改成你自己的emule临时文件目录,然后保存为 *.vbs 的文件,如emule.vbs

dir="E:\Temp"
Set fso=CreateObject("Scripting.FileSystemObject")
cmd="shutdown -s -f -t 60"
Set ws=WScript.CreateObject("WScript.Shell")
Wscript.Echo "emule自动关机脚本已运行……"
count=0
do until count<-1
chksize = fso.GetFolder(dir).Size
If chksize=0 Then
ws.run cmd,0
End If
WScript.Sleep 120000
loop

此脚本的作用是每两分钟检测一次temp文件夹,若emule下载完成,则temp为空,脚本执行关机命令倒计时60秒关机。

原文地址:
http://www.paozhuan.cn/95

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.