Skip to main content
Solved

FTPCaller URL and Target FIle name more dynamic

  • November 8, 2022
  • 2 replies
  • 63 views

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.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

caracadrian
Contributor
Forum|alt.badge.img+23
  • Contributor
  • 571 replies
  • 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
  • 20 replies
  • November 9, 2022

Thanks @caracadrian​ this is very helpful!