Hello everyone in the N8N community, I’m new to the tool but I’ve already completed several courses, and I’m having difficulty saving files using the “Read/Write Files from Disk” node.
See, I have several image files (data) and I want each one to be saved in a certain folder with different names.
The problem is that for some reason the files are overwritten one over the other and I don’t know what could be wrong.
The filename path separator on windows (backslash - ) is at odds with the escape character in JS strings. The first thing I would try is changing the backslashes in your output filename to forward-slashes (which, iirc, just “works anyway”) C:/Users/Administrator/Documents/n8n/{{ $('Extract from file').item.json.id }}.jpeg
If that doesn’t fix it, see if something in this guide, like doubling/escaping the backslash characters in the JS filename string, helps.
One other option, assuming it actually is a filename-string issue, if you can run Docker on the Windows machine, is to run n8n as a container instead of npm and map the Windows filesystem path, as a volume, into a Linux filesystem path in the container. That would handle the filename translations for you, among other advantages of running in Docker.