A NEW TODAY IS DAWNING!

Tutorial: New Commands in Version 8.03


Introduction

The following provides details of the new commands introduced in BuildProfessional Version 8.03.


TEXT *MKDIR, *COPY, *MOVE, *DIR


Syntax


TEXT *MKDIR directorydataref

TEXT *COPY fromdataref todataref

TEXT *MOVE fromdataref todataref

TEXT *DIR directorydataref xmlsubsetref

Where:

directorydataref is a file system directory, e.g. "C:/tmp" or V-Directory

fromdataref is a file to copy or move.

todataref is the file or directory to copy or move to.

xmlsubsetref is the XML subset to contain directory information.


Description


The new TEXT commands allows the developer to perform typical IO routines on operating system files. The file content can be text or binary.


Operation Summary


*MKDIR. Create a directory.

*COPY / * MOVE. Copy or move a file.

*DIR. Return the details of a specified directory in an xml subset. Details include the directories and file in a directory and file properties , such as size and read-only mode.


Example:


NOTE Create a file:
TEXT *STRING *FILE= "C:/mytest.txt"

NOTE Copy it:
TEXT *COPY "c:/mytest.txt" "c:/mytest.xml"

NOTE Make a directory:
TEXT *MKDIR "c:/mydir"

NOTE Move files:
TEXT *MOVE "c:/mytest.*" "c:/mydir"

NOTE Examine the contents of "mydir":
TEXT *DIR "c:/mydir" "testsubset"

XML *WRITE "testsubset" "c:/mydir/testdir.xml"