Get files from folder
Function: Get files from folder
This action allows you to retrieve a list of all files contained within a specified folder. It's useful for processing documents, images, or any other files stored in a particular location.
Input
- Folder: The specific folder from which you want to retrieve files. This is a required input.
Output
- Files: A list of all the files found within the specified folder. Each item in the list represents a file.
- The status: Indicates whether the action was successful or if an error occurred during the process.
Execution Flow
Real-Life Examples
Here are some practical ways you can use the "Get files from folder" action:
Example 1: Listing Invoice Documents
Imagine you have a folder named "Invoices" where all your customer invoices are stored. You want to get a list of all these invoice files to process them further.
- Inputs:
- Folder:
Invoices
- Folder:
- Result:
- Files: A list containing
invoice_101.pdf,invoice_102.pdf,invoice_103.pdf, etc. - The status:
SUCCESS
- Files: A list containing
Example 2: Checking for New Report Files
You have an automated process that drops daily reports into a folder called "Daily Reports". You want to check if any new reports have arrived.
- Inputs:
- Folder:
Daily Reports
- Folder:
- Result:
- Files: A list containing
report_2023-10-26.xlsx,report_2023-10-27.xlsx, etc. (if new reports are present). - The status:
SUCCESS
- Files: A list containing
Example 3: Handling an Empty Folder
Sometimes, a folder might be empty, and you need to handle this scenario gracefully. For instance, a "Temporary Uploads" folder might be empty after files have been processed and moved.
- Inputs:
- Folder:
Temporary Uploads
- Folder:
- Result:
- Files: An empty list (no files found).
- The status:
SUCCESS