Skip to main content
Solved

FTPCaller URL and Target FIle name more dynamic


Forum|alt.badge.img+1

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.

 

Best answer by caracadrian

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.

View original
Did this help you find an answer to your question?

2 replies

caracadrian
Contributor
Forum|alt.badge.img+23
  • Contributor
  • Best Answer
  • November 8, 2022

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.


Forum|alt.badge.img+1
  • Author
  • November 9, 2022

Thanks @caracadrian​ this is very helpful!


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings