Skip to main content

Create file

Create an empty file (or one holding some text), choosing what happens when a file of that name is already there.

Command in the File toolkit · id ooa.file/create · 4 inputs (1 required), 2 outputs

Inputs​

InputTypeRequiredDefaultWhat it is
FileFileYesFile to create; its folder is created when missing.
If existsStringNofailWhen the file is already there: stop with FILE.EXISTS, replace it, create a numbered name such as notes (2).txt, or leave it as it is.
TextStringNoText to put in the new file; empty for an empty file.
EncodingStringNoutf-8Text encoding, e.g. utf-8, utf-16le, windows-1252.

Outputs​

OutputTypeWhat it is
pathFileFull path of the file (the numbered name with keep both).
createdBooleanTrue when a file was written; false when an existing file was kept.