Count Lines in File steps
  • 19 Jul 2022
  • 1 Minute to read
  • Dark
    Light

Count Lines in File steps

  • Dark
    Light

Article summary

Step Details

Introduced in Version3.0.0
Last Modified in Version8.0.0
LocationFile Management

The following steps under File Management focus on outputting a count of the lines in a file. 

These steps will output the total lines in a file, including new line characters. 




Count Lines in File

The Count Lines in File step outputs the total amount of lines in a file. This step requires the full file path to the file in order to execute without issue. If only the name is supplied as an input, then the step will limit its search to the Decisions Server folder and will throw an error if no match was found.

Inputs

PropertyDescriptionData Type
File NameThe full file path to the file, including the extension.String

Outputs

PropertyDescriptionData Type
OutputThe total count of lines in a fileInt32



Count Lines in File Data

The Count Lines in File Data step output the line count of a FileData type instead of a file. This can prove useful when generating a file in Decisions, and retrieving the total line count of the file. The file can also be added as a constant, bypassing the need to specify the file path.

Inputs

PropertyDescriptionData Type
File DataThe file converted to a FileData typeFileData

Outputs

PropertyDescriptionData Type
OutputThe total count of the lines in a fileInt32



Was this article helpful?