>I have a script that removes files with specific file extension and the
> script works fine. Here is the script:
[quoted text clipped - 5 lines]
> there an easier way to just list the file extensions without repeating
> objFile.Extension about 5 times
You could use 'Select Case':
Select Case LCase(objFile.Extension)
Case "txt","doc","rw","rwx"
'Do Something
Case Else
'Do Something Else
End Select
Richard Mueller [MVP] - 28 Aug 2008 15:17 GMT
>>I have a script that removes files with specific file extension and the
>> script works fine. Here is the script:
[quoted text clipped - 14 lines]
> 'Do Something Else
> End Select
Or, to avoid repeatedly retrieving a property value I often assign the value
to a variable. For example
strExt = LCase(objFile.Extension)
If (strExt = "txt") Or (strExt = "doc") Then
In this situation, the Select Case is best (and it is easier to read).

Signature
Richard Mueller
MVP Directory Services
Hilltop Lab - http://www.rlmueller.net
--