Happy to help. It's about time I contributed something to the community. I think that it does remove all of the files from the 3 main locations. The way I had it do the App_GlobalResources folder is kind of lame though. I don't know how to do a 'if like' statement in vbscript. My code is copied below. Just paste it into notepad and name it something.vbs. When you double click on it, select your wwwroot folder from the browser. It takes about 30 seconds to complete. If anyone has any ideas on how to improve please share.
Thanks,
Joe
'Select the wwwroot folder
Dim Path
Path = BrowseForFolder( _
"Select a file or folder to copy", _
BIF_returnonlyfsdirs + BIF_browseincludefiles, _
"")
If Path = "-5" Then
WScript.Echo "Not possible to select files in root folder"
Else
If Path = "-1" Then
WScript.Echo "No object selected; Cancel clicked"
Else
WScript.Echo "Folder selected: ", Path
End If
End If
Function BrowseForFolder(title, flag, dir)
On Error Resume Next
Dim oShell, oItem, tmp
' Create WshShell object.
Set oShell = WScript.CreateObject("Shell.Application")
' Invoke Browse For Folder dialog box.
Set oItem = oShell.BrowseForFolder(&H0, title, flag, dir)
If Err.Number <> 0 Then
If Err.Number = 5 Then
BrowseForFolder= "-5"
Err.Clear
Set oShell = Nothing
Set oItem = Nothing
Exit Function
End If
End If
' Now we try to retrieve the full path.
BrowseForFolder = oItem.ParentFolder.ParseName(oItem.Title).Path
' Handling: Cancel button and selecting a drive
If Err<> 0 Then
If Err.Number = 424 Then ' Handle Cancel button.
BrowseForFolder = "-1"
Else
Err.Clear
' Handle situation in which user selects a drive.
' Extract drive letter from the title--first search
' for a colon (:).
tmp = InStr(1, oItem.Title, ":")
If tmp > 0 Then ' A : is found; use two
' characters and add \.
BrowseForFolder = _
Mid(oItem.Title, (tmp - 1), 2) & "\"
End If
End If
End If
Set oShell = Nothing
Set oItem = Nothing
On Error GoTo 0
End Function
'Start deleting non-english files
Set fso=CreateObject("Scripting.FileSystemObject")
Helpfiles= Path & "\data\HelpFiles"
MessageTemplates= Path & "\data\MessageTemplates"
GlobalResources= Path & "\App_GlobalResources"
'Delete non-english Help Files
For Each file In fso.GetFolder(HelpFiles).Files
If Left(File.Name,2) <> "en" AND Left(File.Name,6) <> "flickr" then
On Error Resume Next
file.delete
end if
Next
'Delete non-english Message Templates
For Each file In fso.GetFolder(MessageTemplates).Files
If Left(File.Name,2) <> "en" then
On Error Resume Next
file.delete
end if
Next
'Delete non-english Global Resources
For Each file In fso.GetFolder(GlobalResources).Files
If InStr(File.Name,".ar") OR InStr(File.Name,".da") OR InStr(File.Name,".de") OR InStr(File.Name,".el") OR InStr
(File.Name,".es") OR InStr(File.Name,".fa") OR InStr(File.Name,".it") OR InStr(File.Name,".nl") OR InStr(File.Name,".pl") OR
InStr(File.Name,".tr") OR InStr(File.Name,".cs") OR InStr(File.Name,".da") OR InStr(File.Name,".fo") OR InStr(File.Name,".fr") OR
InStr(File.Name,".he") OR InStr(File.Name,".hr") OR InStr(File.Name,".ja") OR InStr(File.Name,".pt") OR InStr(File.Name,".ru") OR
InStr(File.Name,".sv") OR InStr(File.Name,".zh") then
On Error Resume Next
file.delete
end if
Next