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 entered. 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 (\). 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 the "Paths to system folders" configurator), 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 string in quotation marks.

The following PROMOTIC system folders are defined:

Path to the main folder of the PROMOTIC system (e.g. C:\Promotic\).
Path to the folder of corresponding PROMOTIC system version (e.g. C:\Promotic\PmVXXYY\).
Path to the PROMOTIC system resources folder (e.g. C:\Promotic\PmVXXYY\Resource\).
The path must be specified also with source type:
#pmres:Anim - Path to folder containing animations (C:\Promotic\PmVXXYY\Resource\Anim\).
#pmres:Img - Path to folder containing images (C:\Promotic\PmVXXYY\Resource\Img\).
#pmres:Report - Path to folder containing reports (C:\Promotic\PmVXXYY\Resource\Report\).
#pmres:Sound - Path to folder containing sounds (C:\Promotic\PmVXXYY\Resource\Sound\).
Path to the PROMOTIC applications folder (e.g. C:\Promotic\Apps\). Path to this folder vcan be set in the file PmCfg.ini in the main folder of the PROMOTIC system.
Path to the PROMOTIC application folder - i.e. to the folder containing the Application.pra file. (e.g. C:\Promotic\Apps\Application1\)
Path to the resources folder (images, sounds, ..) of the application (the folder is defined in the "PmaRoot > Application > #appres: - to resources (resources: jpg,gif,avi,wav,...)" configurator).
Path to the data files folder of the application (the folder is defined in the "PmaRoot > Application > #data: - to data files" configurator). It is recommended to save any data files to this folder.
Path to the application configuration files folder (the folder is defined in the "PmaRoot > Application > #cfg: - to configuration files" configurator). 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 temporary and auxiliary files of the development environment and runtime (the folder is defined in the "PmaRoot > Application > #temp: - to temporary files" configurator).
The contents 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/).
Path to the home folder of the current Windows user (e.g. C:/Users/<user name>/).

- 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 expression. 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.

Pm9.00.18: New system folder: #winuser:.
Pm9.00.03: New system folder: #gpm: and #apps:.
Pm8.03.13: New system folder: #temp:.
Pm8.03.04: Created
PROMOTIC 9.0.21 SCADA system documentation - MICROSYS, spol. s r.o.

Send page remarkContact responsible person
- PROMOTIC path to files and folders
© MICROSYS, spol. s r. o.