|
|
Recent News
|
Hotel Software DocumentationOperations with file system
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Write to file | Writes text in Data to file specified in FilePath. If the file does not exist, it will be created. If it exists already, its content will be replaced. Example: Write File ("C:\test_write.txt", "Hello World. Time is [$_time]") RETURN VALUE: Returns 1 if the file was written successfully. |
Read File | Reads content of file specified in FilePath to variable. RETURN VALUE: Returns content of the file. |
Read File Info | Returns attribute of file specified in FilePath. ReturnValue defines the attribute to be returned:
RETURN VALUE: Returns file attribute. |
Rename File |
Renames a file from SourceFilePath into DestanationFilePath. Examples:
Rename File ("c:\mydoc.doc","c:\yourdoc.doc") - renames the file from mydoc.doc into yourdoc.doc Rename File ("c:\mydoc.doc","d:\mydoc.doc") - moves the file from disk c on disk d RETURN VALUE: Returns 1 if file was renamed. |
Create Directory | Creates directory (folder) specified in DirectoryPath. Example: Create Directory ("c:\test_dir") RETURN VALUE: Returns 1 if the directory was created. |
Delete Directory | Deletes directory (folder) specified in DirectoryPath. Example: Delete Directory ("c:\test_dir") If the folder specified in the parameter is not empty - it will not be deleted. RETURN VALUE: Returns 1 if the directory was deleted. |
Copy Files | Copies the content of the From directory to the To directory. Mask defines the mask which the files to be copied must match. If IncludeSub contains yes - the command will also copy all files and folders contained in the source directory. Examples: Copy Files ("c:\test1", "c:\test2", "*.doc", "No") - copy all files ".doc" files from the folder test1 to the folder test2. At the same time, the nested files will not be copied. Copy Files ("c:\test1", "c:\test2", "*", "yes") - copy the content of the folder test1 to the folder test2 completely. RETURN VALUE: Returns 1 if files were copied. |
List Files | Returns the list of files contained in the folder specified in Directory and matching the mask Mask. Files in the list are separated with the carriage return character; i.e. each line in the returned list will contain only one file. If the parameter IncludeSub contains yes, the list will also include all nested files. To perform operations over each file on the list, you can use the loop For each line from text. Example of obtaining a list:
List Files ("C:\Test", "*.doc", "yes"). If files in the folder specified in the
path exist - the command will return a list like this:
RETURN VALUE: Returns list of files. |
Delete Files | Deletes files in the folder specified in Directory and matching the mask Mask. If IncludeSub contains yes - the command will also delete all nested files and folders. Example: Delete Files ("C:\Test", "*.tmp", "yes") - delete all .zip archive files in the folder "C:\Test" and in the nested folders. RETURN VALUE: Returns 1 if files were deleted. |
Note: Since these commands affect the computer's file system and can potentially harm files, user will be warned of that before the first use of the commands.
See Also:
Today"s Poll
What software do use for your inn/b&b/hotel/etc?
Home Page | Contacs | Terms and Conditions | Copyright (C) 2001-2010 Binary Brilliant Inc | |