FILE Validate file format function

The FILE Validate file format function in RPA.

Help CentreBuilding Processes

This article describes the RPA File functionality to validate a file's format.

For a full list of available functions, please read FILE functions.


Description

The FILE Validate file format function checks if a file is valid for its format. The format is auto-detected from the file extension, or you can specify a format explicitly.


Setting it up

To use the FILE Validate file format function, follow these instructions:

{{popups:rpas/add:action=is-valid-file-format}}

Once on a process map:

  1. Navigate to the process where you would like to add the FILE Validate file format function
  2. Open the Activities sidebar panel
  3. Under Document Processing > Validate, drag "Validate file format" onto the canvas
  4. Configure the file path and optionally select a specific format

Input parameters

ParameterRequiredTypeDefaultDescription
FileYesText-Path to the file to validate
FormatNoSelectAuto-detectExplicit format to validate against (csv, docx, json, pdf, xlsx, xml, png, jpg, bmp, tiff, webp, gif)
VariableNoTextvalidVariable to store the result (true/false)
CSV delimiterNoSelectCommaDelimiter for CSV validation

Output variables

VariableTypeDescription
{valid}Booleantrue if the file is valid, false otherwise

Errors

ErrorDescription
File not foundThe file does not exist

Tips

  • If no format is specified, the format is auto-detected from the file extension
  • Use this before processing files to prevent errors from corrupt or invalid files
  • Combine with a Decision step to branch based on the validation result

See it working on your own data

Everything documented here ships with the platform – try the document tools free, or go live in 7 days.