Parses a string that contains a path to retrieve specific information from it, such as the filename or the drive letter.
Action ID: 72
Action Category: Strings
The name of the variable to store the result in.
The path that you would like to parse.
The information that Setup Factory will store in the Store result in variable variable. Choose from:
Drive ("C:"): This will determine the drive letter from the supplied path, and store it in the variable.
Drive and folder ("C:\Folder1\Folder2"): This will store the drive letter and the folders (i.e. the full path with the filename removed) in the supplied variable.
Folder ("Folder1\Folder2"): This will store the folders (i.e. the full path with the drive letter and filename removed) in the supplied variable.
File name ("filename.ext"): This will store the filename (including the extension) in the supplied variable.
File extension ("ext"): This will determine the filename's extension and store it in the supplied variable.
Folder and file name ("Folder1\Folder2\filename.ext"): This will store the folders and the filename (i.e. the full path with the drive letter removed) in the supplied variable.
None.
In this example, we will parse a string that contains the path to a previous installation of our product.
We have already stored the path to the previous main executable in the variable %PrevPath%. The problem with %PrevPath% is that it contains our main executable's filename (i.e. C:\Program Files\My Install\MainRun.exe) but we only want the drive and folder names.
We will store the result in: %AppDir%
Note: It is not generally a good idea to modify %AppDir% unless you are an advanced user.
Store result in variable: %AppDir%
Source Path: %PrevPath%
Information to store:
Drive and folder ("C:\Folder1\Folder2")
See Also: Alphabetical List of Actions, Categorical List of Actions, On Error tab