Uploading multiple files from same directory for processing

Hi,
I’m trying to create a workflow that uploads and processes multiple files from the same directory that’s compatible with the KNIME server. The file upload node allows uploading a single file, but I haven’t been able to loop over each file in the directory and upload everything automatically. What’s the best way to do that?

In more detail, the directory will contain a single xls file and multiple SDF’s and the info in the xls file will have to be added to the info in the SDF file, eventually spitting out a single xls file with the integrated info from all the files.

Thanks,
Natasja

Hi @nbrooijmans,

I think you can use the File Chooser node which allows you to select a directory. You can feed the selected directory via flow variable into the List Files node and loop afterwards over the files, read them, and do the processing.

Cheers,
Simon

Hi Simon,

Unfortunately that node requires the directory/file to be on a mounted drive within the KNIME server, not a local hard disk.

Thanks,

Natasja

Yes, you need to have your data on your server to do this. I don’t think there is another way.

Cheers,
Simon

I worked around it by putting all the necessary files in a single zip file, uploading that, and unzipping into a temp directory that can be created on the KNIME server.

4 Likes

Glad you found a solution! That’s a clever workaround, I didn’t think about it.