I am using the FTP Input plugin with the option “Search in subfolders”. Now I need to get the subfolder name from where I catch the file. JobInfo %4 should do that, but there I only get the main folder.
How can I get the subfolder name?
EDIT: I tried also the SFTP plugin but there is no option “Search in subfolders”…
Unfortunately you can’t. The FTP Input task only returns the name of the folder you specify (i.e. the root folder) but not the name of any subfolders where files may be picked up from.
Either you’ll have to specify each subfolder from which you want to fetch files (the folder name is dynamic, so you could use a variable in there to specify a subfolder name) or you’ll have to make sure each file on the FTP server is named appropriately before Workflow retrieves it.
Thank you for your reply. I have to use the external OL plugin for SFTP-Input now and there is no possibility to catch files from subfolders. Because of that limitation I have to use another method anyway.
My “workaround” now is to make a http request from the webserver to trigger my SFTP-Input process. Within the request I specify the exactly subfolder and filename.