Path expressions

Previous Next

 

 

In contexts where folders or files are expected, the USoft Blend framework processes path expressions. They are the expressions that Microsoft Windows supports for designating (sets of) folders and files on the file system in command line syntax, ie., in the context of a Command Line Prompt (cmd.exe).

Data type

Explanation

Examples

path

An expression that points to a file or folder on the file system, or to a set of files or folders.

c:\temp\MyFolder

 

temp\MyFolder\

 

\\fs\temp\MyExample.xml

 

..\MyExample.xml

 

temp\*.xml

 

c:/temp/MyFolder

 

Many path expressions are a sequence of steps separated by backslashes that traverse the file system to point at the target file(s) or folder(s):

c:\MyFolder\MySubFolder\MyFile.txt

 

In the Windows OS, the backslash ( \ ) is the most common separator symbol between steps. It is the separator symbol required in DOS command lines. The USoft Blend API accepts the forward slash ( / ) as an alternative. But because of the mix of paths and XPath expressions, best practice in USoft Blend scripting is to reserve the backward slash for path expressions and the forward slash for XPath expressions.

Steps are not allowed to contain spaces, but they may contain underscores ( _ ) and hyphens ( ‑ ).

If a path ends in a backslash, the path matches only a folder, not any file in that folder:

c:\temp\

 

If the rightmost step is intended as a file name, one or more asterisks ( * ) in this file name act as wildcards representing any number of characters. The following path pattern points to all the files with extension ".xml" in the "c:\temp" folder:

c:\temp\*.xml

 

 

collapseAbsolute paths and relative paths
collapseFile paths and folder paths
collapseFile name patterns
collapseDirectory name patterns

 

 

See also

Guide to expressions and data types

         Literal expressions

                 Dates

                 string literals

         Path expressions

          XML expressions

          XPath expressions

                 Node set expressions

                 Booleans

                 Strings

                 Numbers

                 Function calls

                 Variable references

                 Implicit XPath datatype conversion

                 Evaluated expressions vs. literals

          SQL expressions