Create Command

This command creates a file via the system console and writes data into the file.

Create [-append] file
data^Z  or  data^C

Prerequisites

None

Parameters

-append

An optional switch that indicates if data should be appended to the end of an existing file. If omitted and the file exists, any previous data is deleted and new data is written at the beginning of the file. If the file does not exist this switch is ignored.

file

A required parameter that specifies the full path and name of the file that is be be created.

data

A required sequence of data that is written into the file terminated by a ^Z character (decimal value 26) or ^C character (decimal value 3).  The data sequence can be null or it can contain multiple lines.

Remarks

This command creates a file or appends data to an existing file. It allows data of arbitrary length to be written into the file. The file data must be terminated by a ^Z or ^C character, followed by the normal line terminator.

Embedded line termination characters are written into the file.

Examples

GPL: Create /flash/test.txt
This is sample text, line 1
This is sample text, line 2
^Z


GPL: type /flash/test.txt
This is sample text, line 1
This is sample text, line 2
GPL: ]

See Also

Console Commands | New StreamWriter