Path and File Names

Prev Next

Introduction to portable Path Names

The different operating systems (Windows, Linux, MacOS) use different conventions to specify drives, directory path names and file names. Directory separators (slash or backslash) is one example. FUll case sensitivity of path and file names in LINUX and MACOS environments is another example. B4P supports various measures in order to make path and file naming more portable for the applications.

  • Both directory separator symbols "/" (UNIX/ / LINUX style) and "\" (WINDOWS style) are supported. They will be changed to the right symbol automatically before accessing directories and files in the present operating system.
  • Returned directory and file names, e.g. in directory listings, search files() function, etc. will use the directory separator native to the operating system (e.g. "/" under LINUX).
  • Under LINUX and MACOS, the file names are fully case sensitive.
  • Under Windows, case sensitivity only applies to creating new directory and file names.
  • Please avoid using following special symbols in file names:
    • : Colon - Used to specify drives in Windows environments
    • ", ' quotation marks - Not valid as part of file name. Quotation marks may be needed at command level to specify path and file names containing spaces, but not to be done in B4P code.
    • *, ? wildcard symbols specific for directory and file names
    • , comma - B4P uses commas to specify multiple file names, e.g. in the directory listing() function
    • & ampersand - Typically a control symbol for operating system command shells
    • <, >, | - Rediction and piping
    • /, \ - Directory separators
  • Further OS-specific restrictions on path and file names may apply
  • Wildcard symbols are resolved by B4P and not by the operating system.