Private
Function
TryParseFolderName(Folder
As
String
,
ByRef
FolderInfo
As
FolderInfo)
As
Boolean
Dim
fi
As
FolderInfo
With
CreateObject(
"VBScript.RegExp"
)
.Global =
False
.IgnoreCase =
True
.MultiLine =
False
.Pattern =
"([^\\_]+?(\d+))_+([^\\_]+)_+([^\\_]+)_+(.+)"
With
.Execute(Folder)
If
.Count > 0
Then
fi.Id =
CLng
(.Item(0).Submatches(1))
fi.Status = .Item(0).Submatches(3)
fi.FullName = .Item(0).Value
FolderInfo = fi
TryParseFolderName =
True
End
If
End
With
End
With
End
Function