Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

« Previous Version 12 Next »


 

Append Line

This activity appends a line at the end of a text file.

Activity Parameters

The Append Line activity parameters can be provided by manual inserted values or via IN arguments or variables:

Parameters:

  • File (text box editor type) (type: string): the full path (including the file name) of the file. If does not exist, it will be created.
  • Line (text box editor type) (type: string): the string to be appended to the end of the file.

The Read Only Output variable are the possible output values that the activity will provide:

  • Output Status  (type: boolean): outputs the result status. If the operation succeeded then TRUE, otherwise FALSE.


Execution: the activity will append the new line at the end of the given file:


The added line can be seen in the text file:





 

Delete Line

This activity deletes a line from a text file based on the given line number.

Activity Parameters

The Delete Line activity parameters can be provided by manual inserted values or via IN arguments or variables:

Parameters:

  • File (text box editor type) (type: string): the full path (including the file name) of the file.
  • Index (text box editor type) (type: int32): the line number of the line which will be deleted from the file. The first line has the index 0, the second line 1 and so on. For example, the 10th line will have index 9.

The Read Only Output variable are the possible output values that the activity will provide:

  • Output Status  (type: boolean): outputs the result status. If the operation succeeded then TRUE, otherwise FALSE.
 

NOTE: the first line from a file will have the index 0.

Execution: the activity will remove from the text file the line with the specified index (if set to 1, the second line will be deleted):





 

Find Text

This activity finds and returns the lines that contain a specific text from a text file.

Activity Parameters

The Find Text activity parameters can be provided by manual inserted values or via IN arguments or variables:

Parameters:

  • File (text box editor type) (type: string): the full path (including the file name) of the file.
  • Search Text (text box editor type) (type: string): the text to be found in lines within the file.

The Read Only Output variable are the possible output values that the activity will provide:

  • Output  (type: collection<string>): outputs a Collection containing the matching lines. For Each or Get Element From Collection activities can be used to extract the collection's values.
 


Execution: the activity will search for the lines which contain the "Email" text (or any other value specified in the SearchText field). 

Using the For Each activity in order to extract the lines values:

 


Using the Get Element From Collection activity in order to extract the lines values:

 



 

Get Lines

This activity retrieves lines from a text file based on the specified parameters.

Activity Parameters

The Get Lines activity parameters can be provided by manual inserted values or via IN arguments or variables:

Parameters:

  • Count (text box editor type) (type: int32): the number of lines to be retrieved starting from the given start index.
  • File (text box editor type) (type: string): the full path (including the file name) of the file.
  • Index (text box editor type) (type: int32): the line start index from which lines are retrieved from the file. If set on 0, the search will be made starting with the file's first line. The first line has the index 0, the second line 1 and so on. For example, the 10th line will have index 9.

The Read Only Output variable are the possible output values that the activity will provide:

  • Output  (type: collection<string>): outputs a Collection containing the retrieved lines. For Each or Get Element From Collection activities can be used to extract the collection's values.
  • Output Rows (type: int32): outputs the number of retrieved lines.


 
Execution: the activity will read the given file starting from the line specified in the Index field and will output the content of the following number of lines specified in the Count field (if Index is set on 0 and Count on 4, the first 4 lines will be retrieved):


Using the For Each activity in order to extract the lines values:

  


Using the Get Element From Collection activity in order to extract the lines values:

  

 






Insert Line

This activity insert a line at a specified position in a text file.

Activity Parameters

The Insert Line activity parameters can be provided by manual inserted values or via IN arguments or variables:

Parameters:

  • File (text box editor type) (type: string): the full path (including the file name) of the file.
  • Index (text box editor type) (type: int32): the index where the line will be inserted. The first line has the index 0, the second line 1 and so on. For example, the 10th line will have index 9.
  • Line (text box editor type) (type: string): the string to be inserted in the file.

The Read Only Output variable are the possible output values that the activity will provide:

  • Output Status  (type: boolean): outputs the result status. If the operation succeeded then TRUE, otherwise FALSE.
 

Execution: the activity will insert the given line into the given file, at the given position (in our case, on the first line).

The added line should be seen in the file:



 

Search and Replace Text

This activity finds a section of text and replaces it with another one, in a text file.

Activity Parameters

The Search and Replace Text activity parameters can be provided by manual inserted values or via IN arguments or variables:

Parameters:

  • File (text box editor type) (type: string): the full path (including the file name) of the file.
  • Replace Text (text box editor type) (type: string): the text to be replaced in lines within the file.
  • Search Text (text box editor type) (type: string): the text to be found in lines within the file.

The Read Only Output variable are the possible output values that the activity will provide:

  • Output Status  (type: boolean): outputs the result status. If the operation succeeded then TRUE, otherwise FALSE.
 
Execution: the activity will search for the given text and will replace it with the given new value:
The replaced text can be seen in the file:
  • No labels