Find File action
The Find File action searches for a file or folder on the target system and if found, stores the file's parent folder's path in a variable. This action is typically used to search for a previous version or related product on the target system and set an installation folder's path accordingly.
Attributes
The following attributes and options are available.
Attribute | Description |
---|---|
Action name | Enter the name of the action. This name is only used in InstallMate and is not visible to the user. |
Search mask | Enter the file name or wildcard specification to search for on the target system. You can use the usual wildcard syntax: * to denote zero or more arbitrary characters and ? to denote a single arbitrary character. |
Search list | Enter the list of folder paths to search, separated by semicolons. The semicolons, if any, should appear directly in this field (for example, <ProgramFilesFolder>;<WindowsFolder>); semicolons that are part of the variable expansion are ignored. |
Recursive | Check this box to perform a recursive search in each of the folders specified on the Search list; clear it to search each folder without recursion into subfolders. |
Find folder | Check this box to search for a folder rather than a file; clear it to search for a file. |
Symbol name | Enter the name of the symbolic variable whose value must be set if the file is found, or click ... (browse) to open the Select Symbolic Variable dialog box that allows you to select a variable from the project. The indicated variable's value is set if the file is found; if not found, the variable's value is left as-is. This allows you to provide a default value for the variable that is used if the file is not found or the action not executed. Typically, the symbol name is the folder alias of the folder whose path you want to set based on the location of the file specified by Search mask. In that case, the folder alias symbol automatically has a default value based on its location in the folders tree on the Files and folders project page. |
Indirect symbol | Check this box to make the Symbol name link indirect; clear it for a direct link. If the link is indirect, the variable specified in the Symbol name field is used to obtain the name of a second variable, and it is this second variable whose value is updated by the action. With a direct link, the variable specified by the Symbol name attribute itself is updated. |
Store full path | Check this box to store the full file path if the file is found; clear it to store the file's parent folder's path. The latter is typically used if you use this action to find the installation folder of a related product (for example, a previous version) by searching for a key file, and want to use the folder's path for an installation folder. |
Condition | Enter the conditional expression that determines if the action will be executed, or leave empty for unconditional execution. |
Platforms... | Click this button to open the Select Installation Platforms dialog box that allows you to select the Windows versions on which the action must be executed. This platform selection acts as an additional condition for the action. |
Disabled | Check this box to disable the action. A disabled action is not included in the installer and not checked during the build. You can use this option to remove actions temporarily from your installer without permanently deleting them. Disabled actions are shown with a grayed-out icon. |