FILENAME - Get the filename & extension, without the path (Reports & Settings Report Generator function)
From Catalyst
Revision as of 11:39, 22 September 2016 by Les Ward (talk | contribs) (Les Ward moved page FILENAME - Get the filename & extension, without the path (Reports & Parameters Report Generator function) to FILENAME - Get the filename & extension, without the path (Reports & Settings Report Generator function))
Syntax
$FILENAME{filepath}
Description
Given a string containing a file name with path information, will return just the file name and extension with drive letter and/or path stripped off.
Given 'c:\sx\cr$err.log' as input, would return just 'cr$err.log'. |
Will also cope with "Unix" style paths, which contain "forward slashes" as opposed to "back slashes"; as well as taking, for example, 'c:cr$err.log' and returning just 'cr$err.log'. |
Parameters
- filepath
- A text parameter that can not be omitted.
- The path and filename of the file.
Returns
A text value. Will return the file name and extension portion of the input text.