Skip to main content
Utils

Batch file download

Batch file download

Downloads several files from a list of URLs, saving them to a destination folder. The downloads run in parallel, making the process more efficient. Failures on individual files do not stop the others — the results are consolidated in the action's returns.


Options

Destination folder

Full path of the folder the files will be saved to, for example C:\Downloads\Lote.

Create the destination folder if it does not exist

Defines whether the destination folder is created automatically when it does not exist. Select Yes to create it; otherwise the action fails when the folder is missing.

File list

List of files to download. Each item of the list represents one file and must hold the following fields:

Download URL

URL address of the file to download.

Name to save the file under

Name the file will be saved under in the destination folder, including the extension, for example relatorio.pdf.

Returns

Javascript code

js
actions["action-id"].allFilesDownloaded // whether every file was downloaded successfully (Yes/No)
actions["action-id"].filesWithSuccess // list with the names of the files downloaded successfully (List)
actions["action-id"].filesWithError // list with the names of the files that failed (List)
actions["action-id"].errorsByFile // map with detailed errors by file name (Any)

Field selection

  • allFilesDownloaded — whether every file was downloaded successfully (Yes/No)
  • filesWithSuccess — list with the names of the files downloaded successfully (List)
  • filesWithError — list with the names of the files that failed (List)
  • errorsByFile — map with detailed errors by file name (Any)

Rules and Conditions

  • The Destination folder field is required.
  • The list must hold at least one file, and each item must have its URL and name filled in.
  • Failures on individual files do not stop the download of the others.