File Functions
FILE_ISEXISTEDReturns TRUE if the file or folder does exist. string FILE_ISEXISTED( filename ) FILE_DATEGets the date of a file. datetime FILE_DATE( filename[, type = 0 ] ) The parameter type can be one of the following:
FILE_SIZEGets the size of a file. number FILE_SIZE( filename ) FILE_PATHGets the path from a full path filename. string FILE_PATH( filename ) %=FILE_PATH( @"c:\\document\\abc.log")% Returns then extension "c:\\document\\" FILE_NAMEGets the name from a full path filename. string FILE_NAME( filename ) %=FILE_NAME( @"c:\\abc.log")% Returns then extension "abc.log" FILE_EXTGets the extension name within a full path filename. string FILE_EXT( filename ) Examples%=FILE_EXT( @"c:\\abc.log")% Returns then extension "log" FILE_TEMPNAMEReturns a name for a temporary file. string FILE_TEMPNAME( [prefix_string],[bool_contain_path] ) Note: The function uses up to the first three characters of this string as the prefix of the file name. The default value of the optional parameter bool_contain_path is FALSE.
FILE_PICKRetrieves a filename from a folder. string FILE_PICK( filename(wildchar is allowed)[, is_folder_allowed][, index] ) The parameter index is zero-based.
FILE_COUNTCounts files of certain type in a folder. number FILE_COUNT( filename(wildchar is allowed) [, search_for_subfolders = FALSE ] [,is_folder_allowed = FALSE ] ) ParametersFilename Specifies a folder, and the file name. The file name can include wildcard characters, for example, an asterisk (*) or a question mark (?), and multiple items are allowed and should be separated by the colon-characeter ;. For example, "C:\WINDOWS\*.BMP;*.JPG;*.GIF", "C:\WINDOWS\*.EXE;*.DLL;*.OCX". search_for_subfolders Optionally, specifies wether sub-folders are to be searched, if TRUE, all sub-folders in the folder will be scaned. is_folder_allowed Optionally, specifies wether the folder is to be counted. If FALSE, only file will be counted. Examples
IMG_RESGets the width or height of an image file. IMG_RES( filename [, what = 0 ] ) The parameter what can be one of the follow:
%=IMG_RES( @"c:\\abc.jpg")% Returns a string "100x200" IMG_LOADLoads an image file and returns a binary data. This function can be used in the action "Input dialog" to show an image, and also be used in the built-in function "BASE64_ENCODE" to base64 an image binary IMG_LOAD( filename ) Examples%=IMG_LOAD( @"c:\\a.jpg")% Loads the image data from the file a.jpg | |
|