Posted Fri, 26 Feb 2021 03:39:28 GMT by

I'm getting a list of files, eg new files from ftp, and want to send this list to an end user in the email. 

Is there an expression to be able to list the file names individually for the user? 

Posted Sat, 27 Feb 2021 04:22:20 GMT by

Eduardo,

 

The list of files that you have you can create a dataset and then write that dataset to a CVS or a log (txt) file then email that to the end user within the body of the email.

 

Here is a sample of what I am referencing.  you can copy and paste this into Task Builder

 

<AMFTP ACTIVITY="logon" SERVER="%var_FTPServer%" USERNAME="username" PASSWORD="AM5YgliO+fIhGgfn5GViDtz+qnX19JhV+4TCS9sxLtkI4k=aME" SESSION="FtpSession1" />
<AMFILESYSTEM ACTIVITY="write_file" FILE="%TaskVar_Log%">%now()% - INFO - Connection established</AMFILESYSTEM>
<!--Obtaining the file list-->
<AMFTP ACTIVITY="advanced" FTPCOMMAND="long_list" PARAMETER="*.*" FTPLONGLISTDATASET="ds_FileList" SESSION="FtpSession1" />
<AMFILESYSTEM ACTIVITY="write_file" FILE="%TaskVar_Log%">%now()% - INFO - List of files obtain. There are %ds_FileList.TotalRows% to be analyzed</AMFILESYSTEM>

This will need to be edited to work on your system with your FTP.

Thanks, Chris

You must be signed in to post in this forum.