Glob.wsc

Get a list of files or folders matching a wildcard expession.
0.01, 2003-05-28

Functions

Glob(wildcardexpression)

Returns an array of absolute file paths that match the wildcardexpression (simple glob style: ? matches a single character, * matches zero or more).

GlobFolders(wildcardexpression)

Returns an array of absolute folder paths that match the wildcardexpression.

Example

Example 1.1. VBScript WSH

Set glob= WScript.CreateObject("Glob.WSC")
For Each file in glob.Glob("ex03*.log")
  WScript.Echo file
Next

Setup

  1. Download Glob.WSC (somewhere permanent, like a system directory).

  2. Right-click the file and choose Register.