Skip to main content

Currently we hardcoded the ‘URL’ & ‘Target File’ attributes in our FTPCaller parameters:

FTPCaller2Is there a way to specific them in a more dynamic way?

For example, ‘Operating Account Structure - Export Budget 2022-09-22_13_27_55_PDT.csv’, the '‘Operating Account Structure - Export Budget ' part is static and '2022-09-22_13_27_55_PDT' part is dynamic date/time. How can we specific the dynamic part with wildcard something like ‘Operating Account Structure - Export Budget%.csv'? Thanks.

 

You should first list the contents of the FTP folder, sort the results, filter for just the file/files you need and input the filename into a second FTPCaller.

FTP list files and downloadTo extract the filename from the FTP response you can use a series of AttributeSplitter with Delimiter Newline (\\n - LF), ListExploder, AttributeSplitter with Delimiter Space ( ) and ListIndexer with List Index To Copy -1 (last element). Figure something else if your filenames contain spaces. Concatenate the extracted filename with the original URI in the second FTPCaller.


Thanks @caracadrian​ this is very helpful!


Reply