How to save file to specific path?

Describe the problem/error/question

How do I save a csv file to a specific directory? like for example I want to save it to C:\Users\Administrator\Downloads\

What is the error message (if any)?

Please share your workflow

Share the output returned by the last node

Information on your n8n setup

  • **n8n version:**1.81.4
  • **Database (default: SQLite):**default
  • **n8n EXECUTIONS_PROCESS setting (default: own, main):**default
  • **Running n8n via (Docker, npm, n8n cloud, desktop app):**npm
  • **Operating system:**Windows Server 2022

There is a “Read/Write Files from Disk” node that does exactly that.

Since all my n8n instances run on *nix systems, I can’t say for sure how it behaves on Windows. However, the directory must already exist and have the necessary permissions.

If n8n is running in Docker on Windows, the file path will be different and needs to be adjusted to match the mounted Docker volumes.

1 Like

If the file exist does it overwrite?

Yes, it will overwrite. You can check with an ‘execute command’-node and use ‘ls {{filename}}’ to see if it exists already and then use an ‘If’-node to skip the ‘Read/Write Files from Disk’-node after.

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