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) IfNot bMatch Then ExitSub EndIf
If oFS.FolderExists(sEvalPath) Then oFS.DeleteFolder sEvalPath, True EndIf EndSub
If oFS.FolderExists(sHomeFolder) Then ForEach oFile In oFS.GetFolder(sHomeFolder).SubFolders removeEval oFile, sHomeFolder + "\" + oFile.Name + "\config\eval" Next EndIf
If oFS.FolderExists(sJBDataFolder) Then ForEach oFile In oFS.GetFolder(sJBDataFolder).SubFolders removeEval oFile, sJBDataFolder + "\" + oFile.Name + "\eval" Next EndIf