Skip to main content

Get File Names

Description

Get File Names scans a specified directory path and returns a list of files along with their metadata — including filename, path, size, type, extension, modification time, and read/write status — as rows in the data stream. Use this step when your workflow needs to discover files dynamically before processing them, such as iterating over all CSV files in a folder or filtering files by name pattern. It supports regular expression wildcards for file selection and can accept the source path from a previous step field for flexible, data-driven file discovery.

Configurations

Field NameDescription
Filename is defined in fieldEnable checkbox if filename is defined in a field.If this is checked the following four fields are activated.
Get filename from fieldSpecify the field from which to retrieve the filename
Get wildcard from fieldA File can be selected using regular expressions. This field specifies a wildcard for the regular expression. Wildcard you would have a RegEx with something like .*\.dat$

If incorrect regex is specified then ‘Regex pattern is incorrect so no files will be retrieved’ message is displayed.

Exclude wildcard fieldSpecify a wildcard to exclude for the regular expression.
Include subfoldersInclude files from the folder and sub-folders.
File or DirectorySpecify the file or directory selection.
Regular ExpressionProvide a regular expression to search files.
Exclude Regular ExpressionProvide a regular expression to exclude files.
Selected filesThis is a tabular list of files selected.
Show filenames buttonClick this button to see what the filename looks like after selecting all the previous settings.
Get

Filter the retrieved file names based on by choosing an option from the list:

- All files and folders

- Files only

- Folders only

Include a row number in the outputEnable checkbox to include a row number in the output.
Rownum fieldnameSpecify a fieldname for holding rownum.
Do not report error on no files or foldersEnable this checkbox not throw error on no files or folders.
Limit the number of rows returnedSpecify a value to limit the number of rows returned to this value.
Add the filename(s) to the result listEnable checkbox to add the filename(s) to the result list.

Note: The output fields for this step are:

  • filename - the complete filename, including the path (/tmp/somefile.txt).
  • short_filename - only the filename, without the path (somefile.txt).
  • path - only the path (e.g. /tmp/)
  • type
  • exists
  • ishidden
  • isreadable
  • iswriteable
  • lastmodifiedtime
  • size
  • extension
  • uri
  • rooturi
  • If you have no files then the step(and the workflow) do not abort. If you want to abort the workflow you could use a ‘Detect Empty Stream’ step with some logic.

Secondly, you could also check for no files and abort within a process by the 0 Checks If Files Exist process entry.