OS FileName$: Difference between revisions
m (1 revision) |
(No difference)
|
Revision as of 14:11, 15 January 2012
The OS_FileName$ internal function does returns the real operating system path of a virtual path. In other words it converts a BR filename (A$) based on a Drive statement to the name used by the operating system outside of Business Rules!. This internal function does the opposite of BR_FileName$.
In BR! a file name that is preceded with a colon (":") (i.e. ":C:\Test") is always interrupted as a operating system's file path and/or name. File specifications without a preceding colon will be processed as a BR file path and/or name (a.k.a. Virtual Path)
Syntax
OS_FileName$(A$)
OS_FileName$("C:\Example Path\")
History
- Introduced in BR! 4.18
Comments and examples
When a DRIVE statement included in the BRCONFIG.SYS file, or executed with EXECUTE CONFIG DRIVE .... remaps a location within BR, a system call that refers to a file on the remapped drive will fail unless the remapping parallels the operating system location. Using the OS_FILENAME$(A$) in the system call rather than just the BR name will allow the operating system to find the correct file.
01010 EXECUTE "CONFIG DRIVE X:,\\server1\data\datafiles,\,\" 01020 EXECUTE "SYS COPY "&OS_FILENAME$(X:\tempfile)&" "&OS_FILENAME$(X:\tempfile)&".tmp"
Related functions
- Simple colon (:)