FilePathPart

Revision as of 00:42, 4 March 2021 by Lchrisman (talk | contribs) (Created page with "category:File system functions ''New to Analytica 6.0'' == FilePathPart( filepath, part ) == Returns the requested «part» of a full file path. «part» can be o...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


New to Analytica 6.0

FilePathPart( filepath, part )

Returns the requested «part» of a full file path.

«part» can be one of:

  • 'folder'
  • 'filename'
  • 'name'
  • 'filename only'
  • 'extension'
  • 'parent'

FilePathPart( filepath, 'folder' ) returns the folder part of «filepath» Examples: • FilePathPart("C:\DataFeeds\ISO\HourlyToday.csv", 'folder') → "C:\DataFeeds\ISO" • FilePathPart("C:\DataFeeds\ISO\", 'folder') → "C:\DataFeeds\ISO")

FilePathPart( filepath, 'filename' ) returns just the filename, "" for a directory. Examples: • FilePathPart("C:\DataFeeds\ISO\HourlyToday.csv", 'name') → "HourlyToday.csv" • FilePathPart("C:\DataFeeds\ISO\", 'name') → ""

FilePathPart( filepath, 'name' ) returns the file or folder name. • FilePathPart("C:\DataFeeds\ISO\HourlyToday.csv", 'name') → "HourlyToday.csv" • FilePathPart("C:\DataFeeds\ISO\", 'name') → "ISO"

FilePathPart( filepath, 'filename only' ) returns the filename without an extension • FilePathPart("C:\DataFeeds\ISO\HourlyToday.csv", 'name') → "HourlyToday"

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", 'name') → "csv" • FilePathPart("C:\DataFeeds\ISO\", 'name') → ""

FilePartPart( filepath, 'parent' ) returns the parent folder which is different from 'folder, in the case of a directory. • FilePathPart("C:\DataFeeds\ISO\HourlyToday.csv", 'folder') → "C:\DataFeeds\ISO" • FilePathPart("C:\DataFeeds\ISO\", 'folder') → "C:\DataFeeds")

See Also

Comments


You are not allowed to post comments.