GETFILELIST

Purpose: Search a folder for filenames using a search pattern and produce a text file with the results.

Format:    GETFILELIST  path name / search pattern       filename

Notes:      path name is the text variable to contain the pathname selection.    filename is the text variable to contain the output text file.  The resultant search is printed as text in the text file.  The file format is as follows:
 
 

Line #
Sample Text
Description
1
FileList  This identifies the file 
2
C:\WINDOWS  The Path name
3
326  The number of listed file and path names
4 - 330
\..
\SYSTEM
\COMMAND
WINSOCK.DLL
WIN.INI
HWINFO.EXE
SMARTDRV.EXE
\SYSTEM32
HIMEM.SYS
etc.
 Files and sub-folder listing.  Folder names 
 are preceeded by a slash character

 

Example:

# Selecting a path from a dialog box and
# display the file listing.

$fname = $temppath "\windows.lst"
getpath $pathname "Select a Path to list"

# Now we have our path, we can add the
# wildcard pattern so we can list all files.

$pattern = $pathname "\*.*"
getfilelist $pattern $fname

# Pop up the text file so we can see.

$cmd = "notepad.exe " $fname
exec $cmd

exit
 
 

See Also:  GETFILE     GETPATH