Otter Documentation

files - Create File

  • Last Modified: 2019-06-07

This is generated from the built-in components of Otter 2.2, and may be different than what you have installed (especially if you have extensions); go to [User Icon] > Documentation within your Otter instance to see exactly what operations are available.

Create File

Creates a file on a server.

Operation type:

Executing - this operation will perform a specified action or actions on a remote server.

Script usage:

Create-File(
	Name: <text>,
	[Text: <text>],
	[Overwrite: <true/false>],
	[FileMode: <text>]
);

This operation may be prefixed with Files::, although this is a built-in namespace and isn't really necessary.

Arguments:

Name Format Script Usage Usage Notes
File name (default)
text
Name
The path of the file to create. This argument is required.
Text
text
Text
Overwrite
true/false
Overwrite
File mode
text
FileMode
The octal file mode for the file. This value is ignored on Windows.

Example:

# write the name of the current working directory to my desktop
Create-File(
    Name: C:\Users\atripp\Desktop\workingdir.txt,
    Text: $WorkingDirectory
);

Is this documentation incorrect or incomplete? Help us by contributing!

This documentation is licensed under CC-BY-SA-4.0 and stored in GitHub.