n8n is awesome but it still lacks some details that may be blocking.
In my case I need to synchronize folders and subfolders available via SFTP to a dropbox account.
I need to compare folders on SFTP and Dropbox as the content is quite heavy and I can’t sync everything on each run.
Fortunately directory structure is known and limited in depth:
-- Root
|-- TeamFoo
|-- 2020-08-24
|-- File1.bin
|-- File2.bin
|-- File3.bin
|-- 2020-08-25
|-- File1.bin
|-- File2.bin
|-- File3.bin
|-- TeamBar
...
My approach is to list Root on both SFTP and Dropbox, wait for both to complete (merge), diff results with a function and create missing team directories on Dropbox and then proceed to list the content of each team directory and again compare to create missing directories.
However I cannot create those nested dirs as I can’t manage to attach the path of each listed directory to the items output by the SFTP node. I’m left with the sole name directory name thus I can’t instruct subsequent dropbox node to create the folder.
I tried messing with split batches and set nodes to add it by myself but at best I manage to attach the path to the first directory but not to the others. Not to mention that this step would make the workflow even more complex…
Adding the path of directories and files to items from SFTP would greatly simplify the task and adding an option for recursion would make it a breeze
Maybe consider doing the same on Dropbox node and other storage nodes.
At least a workaround would be a good start.
Any help would be appreciated