' Collection of code snippets by Arne Vajhøj 
' (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
Set re = New RegExp
re.Pattern = "^(ROUA1SEK)(\d{6})(P)(\d{3})(\.pdf)$"
re.Global = True
Set fso = CreateObject("Scripting.FileSystemObject")
Set dir = fso.GetFolder("C:\etellerandetdir")
For Each f In dir.Files
    If re.Test(f.Name) Then
        WScript.Echo f.Name & " should be processed"
    End If
Next
Set dir = Nothing
Set fso = Nothing
Set re = Nothing
