File - Search

Searches for one or more files and returns a delimited list of paths for all the matching files that are found.

Action ID:
Action Category:
Action List Syntax:

18
File 
<<VARIABLE>>
= File.Search (<<FILENAME>>, <<SCOPE>>)

Settings

Search

Store result in variable:

The variable that the delimited list of file paths will be stored in.

Delimiter:

The delimiter that will be used to separate file paths if more then one matching file is found.

File name:

The name of the file that you want to search for (e.g. MyFile.txt).

You can use wildcards in this field to search for files that match a specific pattern (e.g. *.txt to find all text files).

This field cannot be empty.

Dialog

Display progress dialog

Select this option if you want a "Searching for files" dialog to be displayed while AutoPlay performs the file search.

Dialog title:

The text that will be displayed in the "Searching for files" dialog's title bar.

This field is only available when the Display progress dialog option is enabled.

Dialog text:

The text that will be displayed on the "Searching for files" dialog.

This field is only available when the Display progress dialog option is enabled.

Scope

Local fixed drives

Searches all of the hard drives on the user's computer for the file.

Remote drives

Searches all of the user's mapped network drives for the file. Note that this can take a long time depending on the size of the network drives and the speed of the user's network connection.

Removable drives

Searches all removable drives on the user's system for the file. Removable drives can take many forms, such as floppy drives of various sizes, Zip drives, Jaz drives, etc. Generally you should only use this search option if you have a very specific reason to do so due to the relatively slow speed of most removable drives.

CD-ROM drives

Searches all of the CD-ROM drives on the user's computer for the file.

Specific folders/drives

Select this option if you want to choose specific drives and/or folders to search in.

Custom directories (semicolon delimited):

A semicolon (;) delimited list of drives or paths to search.

This field is only available when the Specific folders/drives option is enabled.

Recurse custom directories

Select this option if you want to search the subfolders of the folders listed in the Custom directories field.

When this option is disabled, only the exact specified paths will be searched.

This option is only available when the Specific folders/drives option is enabled.

Error Codes

Value
(%LastErrorNum%)

Simple Message
(%LastErrorMsg%)

Verbose Message
(%LastErrorDetails%)

0 (OK)

 

 

Examples

Searching for MP3s and adding them to a list box

Searching the desktop for text files