Generating a list of processed files

Post any question you may have in regards to GoAnywhere Director and let our talented support staff and other users assist you.
3 posts Page 1 of 1

jwawrzon

Posts: 9
Joined: Mon Jun 29, 2015 7:59 am

Post by jwawrzon » Tue Oct 27, 2015 9:45 am
I have a process set up that grabs a bunch of files from a server via sftp, runs them through a loop that unzips each file and creates a new directory to unzip it into. The loop then emails the user for each file (the output file variable) that was unzipped. This ends up sending out a bunch of successive emails to the users instead of one email with all of the files that were processes.

Is there a way to take the output file variable and append it to a file list, then send that entire list out in a single email?

Support_Rick

Support Specialist
Posts: 592
Joined: Tue Jul 17, 2012 2:12 pm
Location: Phoenix, AZ

Post by Support_Rick » Tue Oct 27, 2015 10:27 am
Create a var before getting into your loop (ie, something like MyZipFiles) and initialize to ${system.emptyString}

Inside your Loop, Just append the file name to MyZipFiles as you go through the loop. Something like:

SetVar ${MyZipFiles} = ${Concat( MyZipFiles, ThisFile:name, system.carriageReturn )}

Then, print ${MyZipFiles} inside your email at the end.
Rick Elliott
Lead Solutions Consultant
(402) 944.4242
(800) 949-4696

jwawrzon

Posts: 9
Joined: Mon Jun 29, 2015 7:59 am

Post by jwawrzon » Tue Oct 27, 2015 11:26 am
Thanks Rick. This worked perfectly.
3 posts Page 1 of 1