There is a built-in Script Language available in Visual Installer. The script language is very versatile and with the script commands you can do different kind of file operations and other types of operations during an installation.
One common operation is to copy or move files during an installation. There are commands available in Visual Installer’s script language that can do this. If you need to copy or move many files at once, you can use the MCOPY and MMOVE commands for this purpose. Below is the syntax of these two commands described:
Copies many files at once. %Source specifies the source file path and %DestinationDir specifies the destination folder for the files.
MMOVE %Source, %DestinationDir
Moves many files at once. %Source specifies the source file path and %DestinationDir specifies the destination folder for the files.
You can use wildcards with the %Source parameter. Example: “%DESTDIR\Data\*.txt”. The code examples below show how to use these two commands with wildcards etc.:
Example 1 – Copy many files at once
Copies all files in the %DESTDIR\Data folder to the %DESTDIR\NewPlace folder:
MCOPY %DESTDIR\Data\*.*, %DESTDIR\NewPlace
Example 2 – Move many files at once
Moves all text files in the %DESTDIR\Data folder to the %DESTDIR\NewPlace folder:
MCOPY %DESTDIR\Data\*.txt, %DESTDIR\NewPlace
For more information about Visual Installer’s script language, see this web page:
> Advanced Tips & Tricks for SamLogic Visual Installer
This post first appeared on SamLogic Software Blog | A Blog With Information A, please read the originial post: here