Create directories based on string?

Hello! Is it possible to create a directory based on a string with a path?
Today I do some downloads from a sftp, and I would like to keep the original path. Is it possible?

In my function, I was able to create the strings with the dirs I would like to store the files, but I couldn’t find any way to create it =/

Tks for the help =]

Please share the workflow

Share the output returned by the last node

Information on your n8n setup

  • n8n version: 0.195.0
  • Database you’re using (default: SQLite): default
  • Running n8n with the execution process [own(default), main]:
  • Running n8n via npm

Hey @fmarcell,

Welcome to the community :cake:

That sounds like it would be a good feature request to enable creating folders in the write binary file node if it doesn’t exist. At the moment the best I can think of would be to use the execute command node and something like mkdir -p to create the folders (assuming a Linux / Unix based OS)

1 Like

Thanks for the help!
This option have worked for me \o/

Ah, and thanks for the welcome =]
glad to be part of this community

1 Like