download file to local path

Hi there,
it’s an easy question for regular users I guess but I’m new to KNIME and I don’t find any solution online.
I’m trying to download a bunch of pdf files from internet and I have a table with a column containing all the URI for each file and a column containing the my destination local folder on my desktop.
I use the Download / Upload from List (legacy) node giving the 1st column as a source and the 2nd column as a target but I get the following error in the Console pane:
ERROR Download / Upload from List (legacy) 3:8 Execute failed: C:\Users\xxxx\Desktop\PDFs (Accesso negato)

I even tried to change the destination folder to my local workflow folder but the result is the same.

Any help would be highly appreciated.
Thank you in advance.

Paolo

Hello @pippo82,

although they should work it is suggested to use non deprecated nodes. For downloading there are Transfer Files nodes:

Make sure to check File Handling guide mentioned in node description of above linked nodes to learn and understand how file handling work in KNIME. And of course if any questions feel free to ask :wink:

Br,
Ivan

2 Likes

Hi Ivan @ipazin,
thanks a lot for your fast reply.
I tried to both the nodes you mentioned but had no success.
From what I read in the links you provided and from File Handling I believe that I need to use the Transfer File (Table) in my case since I have a table of data with the columns containining the source path of all my files and the destination local folder on my pc. All such data columns are present in the table both with string and in URI format.
Whenever I connect my data table to the Transfer Files (Table) node, it shows me a warning saying “No applicable column available”.
I don’t think I’m gonna need to add ports to the Transfer Files (Table) node to add connections for source and destination since all such data are already included in my table.

I attach my table view for your reference (as you can see, I have both the string and the URI of the filepath of the files I want to download and the local destination path).

Thanks again for your time and support.

Paolo

You can convert the String URL column to a Path column via String to Path – KNIME Hub and configure the Filesystem to be ‘Custom/KNIME URL’ and then you can feed this into the Transfer Files node.For the local paths you need to select ‘Local File System’,

Hope this helps.

Best regards
Lars

4 Likes

Just to understand correctly,
I would have thought you need Get request node to download data from a web url? Is Transfer files node capable of doing that as well?
thanks and br

1 Like

Yes that is also possible via the Transfer Files node :slight_smile:

1 Like

Hi @laaaarsi and thanks for the reply!
I finally managed to get to to work and download the files :slight_smile:

Success as well in organizing the files in different subfolders! :grin:

Thanks again for your help!

2 Likes

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