Import only the latest file
How to import only the latest file created/modified using the directory list node and excel node. An example workflow will be helpful.
-
The data flow would look like this:
First configure the Directory list to read the required directory and configure the Pattern property to select the appropriate files. e.g. filter the results to only output .xlsx files:
The output data from the Directory List node includes the modified datetime:
Configure a Sort node to order the matching files by descending Modified datetime:
The first record will then be the most recently modified .xlsx file in the folder. Then use the Head node to only output the record for this file:
You can then pass this record into the Excel File node which is configured to obtain the filename from the 'FileName' input field:
Please sign in to leave a comment.
Comments
3 comments