Skip to content

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.
  • jwawrzon Offline
  • Posts: 9
  • Joined: Mon Jun 29, 2015 7:59 am

Generating a list of processed files

Post by jwawrzon »

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 Offline
  • Support Specialist
  • Posts: 590
  • Joined: Tue Jul 17, 2012 2:12 pm
  • Location: Phoenix, AZ
  • Contact:

Re: Generating a list of processed files

Post by Support_Rick »

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 Offline
  • Posts: 9
  • Joined: Mon Jun 29, 2015 7:59 am

Re: Generating a list of processed files

Post by jwawrzon »

Thanks Rick. This worked perfectly.
Post Reply