It is often needed to enter a path to a file or folder in the PROMOTIC system. Two types of path format can be used. It is recommended to use the PROMOTIC path format.
Microsoft path format
The path format is e.g. c:\data\BoilerPlant\file.dbf, but there are some disadvantages:
- If you want to later modify the disk or folder with application data, then the modification may be complicated, because it is used on multiple places in the application.
- Based on the Microsoft standard, the items in path are separated by backslash
language has a special purpose for the backslash. Therefore two backslash characters must be used instead of one, e.g. "c:\\data\\BoilerPlant\\file.dbf"
PROMOTIC path format
The path format is e.g. #data:BoilerPlant/file.dbf, i.e.:
- The path does not begin with the drive letter but with PROMOTIC system folder (e.g. #data:
). This folder is defined on one place only (see Paths to system folders
), and therefore can be changed easily and the path modification will project itsef into all paths used in the application.
- The path items are separated by slash (/) so there is no problem using these in the text in quotation marks.
The following PROMOTIC system folders are defined:
Path to the PROMOTIC folder (e.g. c:/pm/).
Path to the PROMOTIC resources folder (e.g. c:/pm/resource/).
Path to the PROMOTIC application folder - i.e. to the folder containing the Application.pra file.
Path to the application configuration files folder (the folder is defined in the configurator PmRoot > Application > #cfg: - to configuration files). It is recommended to store files with a configuration information to this folder (the information that is not changed very often - contrary to #data:).
Path to the Windows folder (e.g. c:/windows/).
Path to the Windows system folder (e.g. c:/windows/system32/).
- The Pm.DiscGetPath
method can be used for conversion from PROMOTIC format path to Microsoft format path.
- Up to the version Pm8.3.4
the PROMOTIC path format has been defined by the $.path macro expression
. But based on user experiance analysis it has been decided to define paths without the use of macro expressions. The $.path
macro expression is still functional, but its usage is recommended only in special cases, if creation of Microsoft path is needed inside the compounded macro expression.