清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>>
Option Explicit
Private Const FO_DELETE = &H3
Private Const FOF_ALLOWUNDO = &H40
Private Const FOF_NOCONFIRMATION = &H10
Private Type SHFILEOPSTRUCT
hwnd As Long
wFunc As Long
pFrom As String
pTo As String
fFlags As Long
fAnyOperationsAborted As Long
hNameMappings As Long
lpszProgressTitle As String
End Type
Private Declare Function SHFileOperation Lib "Shell32" Alias "SHFileOperationA" (ByRef lpFileOp As SHFILEOPSTRUCT) As Long
'*******************************************************
'
'本程序是给经常掉线且没有插件的玩家使用
'
'****************安装插件者禁止使用*****************
'****************安装插件者禁止使用*****************
'****************安装插件者禁止使用*****************
'****************安装插件者禁止使用*****************
'****************安装插件者禁止使用*****************
'****************安装插件者禁止使用*****************
'****************安装插件者禁止使用*****************
'
'程序运行完会自动启动魔兽世界
'
'*******************************************************
Private Sub Form_Load()
Dim wow, str, dstr, arr, darr, i
Dim sh As SHFILEOPSTRUCT
sh.fFlags = FOF_ALLOWUNDO Or FOF_NOCONFIRMATION
sh.wFunc = FO_DELETE
wow = "E:\World of Warcraft"
'**********************************************************
'wow为魔兽世界的文件夹,玩家根据自己的路径修改
'**********************************************************
str = wow & "\Cache" & "|||" & wow & "\Interface" & "|||" & wow & "\WTF"
dstr = "Cache" & "|||" & "Interface" & "|||" & "WTF"
arr = Split(str, "|||")
darr = Split(dstr, "|||")
If Dir(wow, vbDirectory) <> "" Then '判断文件夹是否存在
For i = 0 To UBound(arr)
sh.pFrom = arr(i)
If Dir(sh.pFrom, vbDirectory) <> "" Then
If InStr(sh.pFrom, darr(i)) <> 0 Then
Call SHFileOperation(sh) '放入回收站
End If
End If
Next i
If Dir(wow & "\World of Warcraft Launcher.exe", vbDirectory) <> "" Then
Shell wow & "\World of Warcraft Launcher.exe", vbHide '启动客户端程序
Else
MsgBox "客户端不存在!"
End If
Else
MsgBox "魔兽文件夹不存在!"
End If
End
End Sub