Page 1 of 1

How to display incoming files from a folder?

Posted: Wed May 28, 2014 3:55 pm
by lovestjarna
I have a folder with a lot of different file types being uploaded. I have sorted out the PDF but I would like to send a mail with all the other files just like a list like this:



- - - - - - - - - - - - - - - - - - - - - - - -



These files have been uploaded to your server:

image1.png

image2.jpg

textdocument.txt

photo4.tif



- - - - - - - - - - - - - - - - - - - - - - - -



Also want it to batch the files - not an email for every file...

I tried to use the "Assemble job" and set the value "After N minutes" to "2" and then the "Orphan timeout (minutes) to "3". So if there are no new files within 2 minutes it collect those into the email.

(If Im thinking right).



Or does anyone else having any other good examples on this?



Best regards

How to display incoming files from a folder?

Posted: Wed May 28, 2014 5:09 pm
by freddyp
[Job.NestedName] will give you a list of all the files in the job folder after the Assemble job. If there are subfolders the formatting may not be what you want and you may have to revert to a script expression. Try {Job.NestedName] first to see if it suits your needs.



Freddy

How to display incoming files from a folder?

Posted: Tue Jun 03, 2014 2:24 pm
by lovestjarna
Well. It is almost ok...

I got this message like this:



------------------------------

Files uploaded…



Job001;• testfile1.jpg;• testfile2.jpg;• testfile3.jpg;• testfile4.jpg





Email was triggered by this folder :

Job001

testfile1.jpg

testfile2.jpg

testfile3.jpg

testfile4.jpg

------------------------------



Now I have set the "Indent" to "• ". But they all come on one line... I would prefer them on one row for each file. I have tried a few "Actions" and also tried "", "r" and "nr" without working.

The last bottom of the message is something that is pre-built from Enfocus and lists them on sinlge rows...



Also... is it possible to rename jobfolder to date instead?

How to display incoming files from a folder?

Posted: Tue Jun 03, 2014 10:52 pm
by dkelly
here's a script expression to grab the names of files in a job folder and return them as a message that could be used with Email body property.



var b = "The following files have been uploaded to the servernn";

var d = new Dir(job.getPath());

var e = d.entryList("*", Dir.Files|Dir.NoDotAndDotDot, Dir.Name);

for (var i=0;i<e.length;i++)

b += e + "n";

b;

How to display incoming files from a folder?

Posted: Thu Jun 05, 2014 1:16 am
by lovestjarna
Hm, Im not sure where in the process to put that expression...

Should it be on the "send email" or on the folder before that and include body text to the email?

Tried both but got errors.

How to display incoming files from a folder?

Posted: Thu Jun 05, 2014 6:29 pm
by dkelly
Sorry, I had a typo in my example. Fixed