PROMOTIC path to files and folders

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, 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 (\). But this is disadvatageous if the path is to be defined as text in quotation marks. For example the JavaScript 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 resources folder (images, sounds, ..) (the folder is defined in the configurator PmRoot > Application > #appres: - to resources (resources: jpg,gif,avi,wav,...)).


Path to the data files folder of the application (the folder is defined in the configurator PmRoot > Application > #data: - to data files). It is recommended to save any data files to this folder.


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 application temporary files folder (the folder is defined in the configurator PmRoot > Application > #temp: - to temporary files).

The content of the folder can be deleted e.g. by the Pm.FileDelete method.


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.
PROMOTIC 8.3.19 SCADA system documentation - MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice