OpenFileForWriting

OpenFileForWriting

What to use it for

Prerequisites for usage

Essential properties to set

Use OpenFileForWriting to write content to a non-binary file, line per line. Often used when each line requires additional processing before writing it to a file.

You can also write content to a file using WriteToFile, that adds content as a single chunk, in single operation.

None.
  • Path
  • Append to file
  • Body (sequence)

Misc

OptionWhat is itHow to use it
Path

 

The full path to the file you want to write to.

You can also provide a path when the file does not exist, yet, In that case, SmartBridge will use this path to create a new file.

Enter a path to the file, that includes file name and extension.

You can enter the following:

  • Absolute folder path.
  • Relative folder path (not recommended).
  • VisualBasic expression that results in a folder path.

Recommended: Enter an absolute path that includes file name and extension.

Append to file

 

Indicate whether to have your content be added to existing content, or overwrite the existing text.
  • Unchecked - Overwrite any existing content (default)
  • Checked - Append to existing content.
Body: Sequence

 

Sequence of Activities to work on each line of the file.

Use at least the Text field of the WriteLine Activity to add your content. Add a value between double-quotes.

Enter one of the following values:

 Read more
  • Constant.
  • Variable, of the type string.
    • Use the variable editor at the bottom of the Workflow Studio screen to define a variable.
  • A VB expression that results in a string.

Display nameName of the Activity.Leave at default, or edit the name to reflect what will happen during the sequence.

File system Activities