When editing a data entry or batch application, or while using CSCode, select Code -> Path Adjuster. A dialog is shown that facilitates working with absolute and relative paths in CSPro logic.
The dialog allows you to specify a path and see how it is expressed as a
string literal, with proper escaping for the backslash characters. In the above example, the path "C:\AMO\Images\UVA.jpg" must be written using escaped backslashes when using
logic version CSPro 8.0+:
"C:\\AMO\\Images\\UVA.jpg". The
Always use forward slashes option replaces backslashes in paths with forward slashes; e.g.,
"C:/AMO/Images/UVA.jpg".
If specifying a directory or file path in the Relative To field, the dialog will display the evaluated relative path. In the above example, relative paths would appear as following:
Relative To (Directory) | Relative Path (CSPro Logic) |
C:\AMO | "Images\\UVA.jpg" |
C:\AMO\Images | "UVA.jpg" |
C:\AMO\Reports | "..\\Images\\UVA.jpg" |
The ... button allows you to browse for a directory or file path. The Copy button copies the text, or CSPro logic, to the clipboard.