ListFiles node output doesn't give a proper location of the file in server

Following issue happens in KNIME Server,
I am using ListFiles to get the JSON files outside the WF(“knime://knime.workflow/…/…/…/Schema/JSON”). The output of the ListFiles contains Location and URL.

  • Location filed consist of “?” as value.

  • URL gives the file path like “file:/SomeFileLocation” in local and in server “knime://knime.workflow/…/…/…/Schema/JSON”.

If i keep the JSON files inside the WF under some folder,(“knime://knime.workflow/Schema/”) In output of ListFiles node I am able to see the proper Location of the file.

I need to use Location of listFiles to get the location of my files outside the WF directory, any help on how to get the location of the Files which is outside the WF will be helpful.ListFiles_Location

Hi @mathi,

could it be that you are missing a / in your url? knime://knime.workflow/…/…/…/Schema/JSON/
instead of
knime://knime.workflow/…/…/…/Schema/JSON

Hi @AnotherFraudUser,

In java snippet i need to pass the file location, Java will not accept the server URL to pick the file(Exception will be thrown for invalid File path.

Valid file location need to be passed to get execute the java snippet.

1 Like

This behavior is by design, as the node description of List Files node says: “Note that if remote locations are listed, e.g. if the workflow is running on a KNIME Server, then the location column will be empty for files living in the KNIME Server repository. Only URLs are returned in this case.”

However, I’d expect List Remote Files node to be able to achieve what you’re looking for, but it seems something does not work as expected. We’ll analyze and keep you posted on any outcome.

4 Likes