Working with files
Use these commands to work with files and folders.
||folder identifier, variable
||Returns the full path to a
||what to extract, where to
||Extracts the file to the
an application. If you specify the path to an avi, mpg, mp3, zip
document or some other document, it will be opened in the default
application associated with this type of files.
This command returns the full path to one of the special folders on the
hard drive. The 1st argument is one of the following folder identifiers:
CURAPP – The file system directory where the application is
TEMP – The file system directory for temporary files. The typical
path is C:\Documents and Settings\username\Local Settings\Temp.
APPDATA - The file system directory that is used as a common repository
for application-specific data. The typical path is C:\Documents and Settings\username\Application
MYMUSIC - The file system directory that is used as a common repository
for music files. The typical path is C:\Documents and Settings\username\My
MYPICTURES - The file system directory that is used as a common repository
for image files. The typical path is C:\Documents and Settings\username\My
MYVIDEO - The file system directory that is used as a common repository
for video files. The typical path is C:\Documents and Settings\username\My
The second argument is the variable that will be assigned the full path
to the folder with the trailing slash ‘/’ at the end.
The following script assigns the full path to the directory where the
application is stored to the CurDir variable:
This command extracts the file stored in the application to the hard
drive. The 1st argument is the path to the file that should be extracted
relative to the root of the compiled directory. The 2nd argument is
the full path to where the file will be extracted to. The 3rd argument
is the variable that will pass the completeness status. This completeness
status can take the following values:
-2 – failed to extract: no such file in the application.
-1 – failed to extract: cannot write the file to the specified
directory on the disk.
0..100 – file extraction progress in percent.
101 – extraction is complete.
The following script extracts the file SomeFile.gif and saves it to
the file specified in the TargetFile variable notifying the ExtractMonitor
variable about the extraction process:
Synonym for exec.