File and Folder Functions
InstallShield 2024 » InstallScript Language Reference
File and folder functions provide a comprehensive way to work with text files, binary files, and folders. Many of the functions use the variables TARGETDIR (in InstallScript projects), INSTALLDIR (in InstallScript MSI and Basic MSI projects) and SRCDIR as the paths and accept only file names as parameters. Wild-card characters are also accepted where appropriate.
Function |
Description |
Makes the specified directory the current directory. |
|
Closes an open file. |
|
Copies a file from one folder to another. |
|
Creates a new folder. |
|
Creates a file with the specified file name. |
|
Deletes a folder. |
|
Deletes a file. |
|
Determines whether or not the specified directory exists. |
|
Determines whether or not the specified disk exists. |
|
Compares one file with another. |
|
Deletes a line in a text file. |
|
Searches a text file for specified text. |
|
Inserts a line in a text file. |
|
Finds all subfolders under the specified folder. |
|
Finds all files in the specified folder and its subfolders that match a file specification. |
|
Finds the first file in the specified folder that matches a file specification. |
|
Retrieves a file's attributes, date, time, and size. |
|
Retrieves a line of text from an open file. |
|
Calls the Windows API GetTempFileName to create a temporary file and perform related actions. Note that unlike GetTempFileName, GetTempFileNameIS creates the folder specified by szPathName if it does not already exist. |
|
Provides file and path checking services, searches for a math coprocessor, tests for administrator privileges, determines whether a particular version of the .NET Framework or a language pack is present on the target system, determines whether Microsoft Windows is running from a shared copy on a network, and more. |
|
Opens an existing file. |
|
Sets the mode in which files will be opened with the OpenFile function. |
|
Reads the specified number of bytes from a binary file. |
|
Renames a file. |
|
Positions the file pointer in a binary file. |
|
Sets the attributes, date, and time of a file. |
|
Sets permissions for a file, a folder, or a registry key. The file, folder, or registry key can be installed as part of your installation, or it can be already present on the target system. |
|
Writes a specified number of bytes to a binary file at the current file pointer location. |
|
Writes a string to a text file. |
|
Copies one or more files from a source folder to a target folder, including subfolders if specified. |
Related Function
Function |
Description |
Presents a dialog that enables end users to select a folder. SelectDir creates the folder if it does not exist. |