FilePathPart
New to Analytica 6.0
FilePathPart( filepath, part )
Returns the requested «part» of a full file path.
«part» can be one of:
'folder'
: FilePathPart( filepath, 'folder' ) returns the folder part of «filepath», for example:- FilePathPart("C:\DataFeeds\ISO\HourlyToday.csv", 'folder') → "C:\DataFeeds\ISO"
- FilePathPart("C:\DataFeeds\ISO\", 'folder') → "C:\DataFeeds\ISO")
'filename'
: FilePathPart( filepath, 'filename' ) returns just the filename, "" for a directory. For example:- FilePathPart("C:\DataFeeds\ISO\HourlyToday.csv", 'filename') → "HourlyToday.csv"
- FilePathPart("C:\DataFeeds\ISO\", 'filename') → ""
'name'
: FilePathPart( filepath, 'name' ) returns the file or folder name, for example:- FilePathPart("C:\DataFeeds\ISO\HourlyToday.csv", 'name') → "HourlyToday.csv"
- FilePathPart("C:\DataFeeds\ISO\", 'name') → "ISO"
'filename only'
: FilePathPart( filepath, 'filename only' ) returns the filename without an extension, for example:- FilePathPart("C:\DataFeeds\ISO\HourlyToday.csv", 'filename only') → "HourlyToday"
'extension'
: FilePathPart( filepath, 'extension' ) returns the lowercase file extension. Is "" for a file without an extension, or null for a folder.- FilePathPart("C:\DataFeeds\ISO\HourlyToday.csv", 'extension') → "csv"
- FilePathPart("C:\DataFeeds\ISO\", 'extension') → ""
'parent'
: FilePartPart( filepath, 'parent' ) returns the parent folder which is different from 'folder, in the case of a directory. For example:- FilePathPart("C:\DataFeeds\ISO\HourlyToday.csv", 'parent') → "C:\DataFeeds\ISO"
- FilePathPart("C:\DataFeeds\ISO\", 'parent') → "C:\DataFeeds")
See Also
Comments
Enable comment auto-refresher