Read Files from any directory

How do I make node red read files from any directory not just files under the directory which it is installed in.
Thank you in advance.

Screenshot-19

1 Like

Thank you for the reply . Do you have an idea if i can read the file path when I am choosing it from an input file?

Are you on Linux or Windows?

windows 10

The file browser should show the path to the file you select.
For Windows you should use back slashes:

\path_to\your_file

The direction of the slashes should not matter - the underlying node runtime will do the right thing.

@hanine if you want to dynamically set the path the file node will read from, you can pass it in via msg.filename.

1 Like

Here you go:
https://www.top-password.com/blog/tag/how-to-find-file-path-windows-10/

1 Like

The file name only passes the name without the path I mean in which directory the path is stored that's what i want because after that it's passed to a read file node which needs the fall path or it will go look for it under the directory which node red is installed in.

You can provide the full path to the file under msg.filename.

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