Lasso Soft Inc. > Home

[File_Create]

[File_Create] creates a new, empty file or a new directory. Accepts one parameter, the location of the file or directory to be created. If the file name ends in a / then a directory is created. Optional -FileOverWrite keyword specifies that the destination file should be overwritten if it exists.

The file tags are protected by four different permissions. The user must have permission for all of the following in order to use this tag:
- Permission to use the tag itself.
- Permission to perform the file operation.
- Permission to work in the directory which contains the files.
- The filename extensions of the files which are being worked with must be allowed in Lasso Administration.

  • Syntax
  • Parameters
[File_Create: File Name]

[File_Create: File Name, -FileOverwrite]
Required Parameters
File Name The name of the file/directory to be created. If the file name ends with a / then a directory is created.
Examples

To create a new, empty file:

Use the [File_Create] tag. The following example creates a file named myfile.txt within the root of the Web serving folder.

<?LassoScript
    File_Create: '/myfile.txt';
    Output: (File_CurrentError: -ErrorCode) + ': ' + (File_CurrentError);
?>
Result:
0: NoError
Tag Link [File_Create] Category File
Type Process Data Source Any
Support Preferred Version 3.0
Output Type None Security Tag,File
Implementation Internal Sets Lasso 6.0, Lasso 5.0,LDML3x

Please note that periodically LassoSoft will go through the notes and may incorporate information from them into the documentation. Any submission here gives LassoSoft a non-exclusive license and will be made available in various formats to the Lasso community.

LassoSoft Inc. > Home

 

 

©LassoSoft Inc 2015 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft