热门

最新

红包

立Flag

投票

同城

我的

发布
qidiani
qidiani
4 年前
trueqidiani

Set oShell = CreateObject("WScript.Shell")
Set oFS = CreateObject("Scripting.FileSystemObject")
sHomeFolder = oShell.ExpandEnvironmentStrings("%USERPROFILE%")
sJBDataFolder = oShell.ExpandEnvironmentStrings("%APPDATA%") + "\JetBrains"

Set re = New RegExp
re.Global = True
re.IgnoreCase = True
re.Pattern = "\.?(IntelliJIdea|GoLand|CLion|PyCharm|DataGrip|RubyMine|AppCode|PhpStorm|WebStorm|Rider).*"

Sub removeEval(ByVal file, ByVal sEvalPath)
bMatch = re.Test(file.Name) If Not bMatch Then Exit Sub
End If If oFS.FolderExists(sEvalPath) Then oFS.DeleteFolder sEvalPath, True End If
End Sub

If oFS.FolderExists(sHomeFolder) Then
For Each oFile In oFS.GetFolder(sHomeFolder).SubFolders removeEval oFile, sHomeFolder + "\" + oFile.Name + "\config\eval"
Next
End If

If oFS.FolderExists(sJBDataFolder) Then
For Each oFile In oFS.GetFolder(sJBDataFolder).SubFolders removeEval oFile, sJBDataFolder + "\" + oFile.Name + "\eval"
Next
End If

MsgBox "done"

CSDN App 扫码分享
分享
评论
点赞
打赏
  • 复制链接
  • 举报
下一条:
以后尽量不要背太重的书包上下班,我的书包太重了,背书包站一个小时地铁,来上班后就会觉得类,肩膀酸。
立即登录