QuestionThe source directories in an installation may have files that change from one compilation to another. Can I add files from a directory dynamically using wildcards with WiseScript?
Answer
The Install File(s) and Copy Local File(s) Actions both allow wildcards in the source path.
Using Install File(s) script action
- Open your .wse project in Wise Installation System or the WiseScript Editor tool in Wise Package Studio.
- Click on Script Editor in Wise Installation System or Setup Editor in WiseScript Editor.
- Select a location in the Installation Script to add an Install File(s) Action and double-click the Install File(s) action from the list of Actions. The Install File Settings dialog appears.
- In the Source Pathname field, enter the path to the directory containing the source files, ending with \*.* to include all files in the directory. Use other wildcards, such as *.exe or *.txt to only include a particular file type.
- Fill in the remainder of the fields on the Install File Settings dialog as desired, and click OK.
Using Copy Local File(s) script action
- Open your .WSE project in Wise Installation System or the WiseScript Editor tool in Wise Package Studio.
- Click on Script Editor in Wise Installation System or Setup Editor in WiseScript Editor.
- Select a location in the Installation Script to add a Copy Local File(s) action and double-click the Copy Local File(s) action from the list of Actions. The Install File Settings dialog appears.
- Use wildcards in the Source field and the Local Path field:
- Use a wildcard in the Source field:
- In the Source field, enter the path to the directory containing the source files, ending with \*.* to include all files in the directory, for example %INST%\MyDir\*.*. Use other wildcards, such as *.exe or *.txt to include a particular file type.
- Use a wildcard in the Local Path field. Entering a path in the Local Path field ensures the progress bar updates accurately at installation runtime.
- In the Source field, enter the path to the directory containing the source files, ending with a backslash '\', for example %INST%\MyDir\.
- In the Local Path field, enter the full path to the directory containing the source files, ending with \*.* to include all files in the directory, for example C:\MyDir\*.*. Use other wildcards, such as *.exe or *.txt, instead of *.* if appropriate.
- Fill in the remainder of the fields on the Copy Local File(s) Settings dialog as desired, and click OK.