About    Download    Order    Support


InnPlanner Reservation Software Videos

About
Download
Order/Prices
Support/Contact
Partner Program
Press Room
Online Help


Recent News

InnPlanner 2010 Released
New faster database engine, more customization features, weekly tariffs, full multi-user work support and much more...

2010 Feb 10

InnPlanner 2010 RC1
InnPlanner 2010 Release Candidate 1 is ready for downloading and testing. You can download it from the "Downloads" section.

2010 Jan 14


Hotel Software Documentation

Operations with file system

List of Actions

Operations with file system


Write to file
(FilePath, Data, )

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
(FilePath)

Reads content of file specified in FilePath to variable.

RETURN VALUE: Returns content of the file.


Read File Info
(FilePath, ReturnValue)

Returns attribute of file specified in FilePath. ReturnValue defines the attribute to be returned:

  • Size - file size, bytes
  • Modified date - date the file was last modified
  • Modified time - time the file was last modified
  • If file exists - returns "1" if the specified file already exists

RETURN VALUE: Returns file attribute.


Rename File
(SourceFilePath, DestanationFilePath)

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
(DirectoryPath)

Creates directory (folder) specified in DirectoryPath. Example:

Create Directory ("c:\test_dir")

RETURN VALUE: Returns 1 if the directory was created.


Delete Directory
(DirectoryPath)

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
(From, To, Mask, IncludeSub)

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
(Directory, Mask, IncludeSub)

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:

c:\Test\MyDoc1.doc
c:\Test\MyDoc2.doc
c:\Test\Folder2\MyDoc3.doc

RETURN VALUE: Returns list of files.


Delete Files
(Directory, Mask, IncludeSub)

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:

List of Actions




Today"s Poll

What software do use for your inn/b&b/hotel/etc?

Do not use
Inn Planner
Access, Excel
ASSD
Auberge
Digitalrez
Easy Inn Keeping
EnSuite HR
GuestMaster
iMagic HR
Smart FX
Other