File System functions
Overview
The file system functions allow you to return information about files, paths, and folders or directories.
DirectoryExists
Given a full path and file name, returns true if the directory exists, otherwise false.
Syntax
DirectoryExists( value )
The required argument value must be a qualified path.
Example
DirectoryExists("C:/Data Files")
DirectoryFromPath
Given a full path, returns the directory without drive prefix.
Syntax
DirectoryFromPath( value )
The required argument value must be a path.
Example
DirectoryFromPath("C:/Data Files/MyData/LargeFile.csv"
returns Data Files/MyData
DriveAndDirectoryFromPath
Given a full path, returns the drive prefix and directory, if one is present.
Syntax
DriveAndDirectoryFromPath( value )
The required argument value must be a path.
Example
DriveAndDirectoryFromPath("C:/Data Files/MyData/LargeFile.csv"
returns C:/Data Files/MyData
DriveFromPath
Given a full path, returns the drive prefix, if one is present.
Syntax
DriveFromPath( value )
The required argument value must be a path.
Example
DriveFromPath("C:/Data Files/MyData/LargeFile.csv"
returns C:
FileExists
Given a full path and file name, returns true if the file exists, otherwise false.
Syntax
FileExists( value )
The required argument value must be a qualified file name.
Example
FileExists("C:/Data Files/MyData/LargeFile.csv")
FileFromPath
Given a full path, returns the file name.
Syntax
FileFromPath( value )
The required argument value must be a qualified file name.
Example
FileOfPath("C:/Data Files/MyData/LargeFile.csv"
returns LargeFile.csv.
FileSize
Given a full path and file name, returns the size, in bytes, of the file.
Syntax
FileSize( value )
The required argument value must be a qualified file name.
Example
FileSize("C:/Data Files/MyData/LargeFile.csv")
FileTimestamp
Given a full path and file name, returns the file timestamp as a DateTime.
Syntax
FileTimestamp( value )
The required argument value must be a qualified file name.
Example
FileTimestamp("C:/Data Files/MyData/LargeFile.csv")
NativePathFromURI
Converts URI-format file paths to OS-native file paths.
Syntax
NativePathFromURI( value )
The required argument value must be a Uniform Resource Identifier (URI).
Example
NativePathFromURI("file:///E:/data/file.csv")
returns E:\data\file.csv
ResourcePathFromName
Given the name of a mapped Resource, returns the associated URI-format path value
Syntax
ResourcePathFromName( value )
The required argument value must be the name of a mapped resource.
Example
ResourcePathFromName( "testshare" )
returns \\TESTING\testshare.ResourcePathFromName( "localresource" )
returns file:///C:/Data.
Use NativePathFromURI to convert URI-format file paths to OS-native file paths.