Auto select latest Excel file in a directory to start manipulating workflow

I have an Outlook script that dumps Excel attachments into a directory: C:/attachments. I would like to open and workflow on the latest Excel file in the directory. Once I get to Excel Reader, I’m good, but I’ve tried many different suggestions without success. Thank you for your help and maybe a sample workflow! Love Knime, can’t wait to learn more!

Hi @KNKLHEAD

You could potentially use something like this:

First read all the files in the directory with a List Files/Folders. Then with a Meta Info node, you can retrieve the Creation Date (or modified date, as you like.)

With a Top-K node, you can get the latest file.

Convert the Path of that file to variable.

You can then feed to variable to the Excel reader and apply the Path variable. This will make sure the Excel File reader will pick up the right file.

Hope this provides some inspiration!

2 Likes

@KNKLHEAD to add to @ArjenEX good suggestions you could try these examples using the Files/Folders Meta Info – KNIME Community Hub node.

2 Likes

It certainly does inspire me! While I haven’t had the time to apply this workflow – I need this workflow to save me time – I look forward to giving it a go.) Thank you very much! My goal is to wake up, press one button and complete all my work for the day and go dirt riding. Ha!

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.