Clear File Content

This is pre-built Action located under the @Generic Element, instructs the Avo Assure to clear the content of the file whose path is provided in Input value and save the result in the dynamic variable.

Syntax

Input Value:

For Text File: <file location>;<file name>

Argument
Description

<file location>

(Required)

Provide the path of the file whose content is to be cleared. Supported format: .txt

<file name> (Required)

Provide file name within which the content should be cleared.

For Excel File: <file location>,<file name>;<sheet name>(Optional)

Argument
Description

<file location>

(Required)

Provide the path of the file whose content is to be cleared. Supported format: .xls, and .xlsx,

<file name> (Required)

Provide file name within which the content should be cleared.

<sheet name> (Optional)

Provide sheet name within which the content should be cleared.

Output value:

Argument
Description

<Dynamic Variable>(Optional);<Dynamic Variable>(Optional)

This variable stores the status as true or false

Example 1

Clear the content of a specified text file The Clear File Content action takes the value from the Input Value column (e.g.,C:\sam;‪sample.txt ) and clears the content of the file named (sample.txt) located at (C:\sam) The action status is saved in the {Status} variable with the following possible values:

  • True if the file content is cleared successfully

  • False – if the file content is not cleared

Example 2

Clear the content of a specific Excel sheet The Clear File Content action clears the content of a specified file or a sheet within a file based on the input value (e.g.,C:\sam;Order details;sheet1). The action status is saved in the {Status} variable with the following possible values:

  • True if the file or sheet content is cleared successfully

  • False –if the file or sheet content is not cleared

Last updated

Was this helpful?