WatchDirectory Forum
http://www.watchdirectory.net/cgi-bin/yabb25/YaBB.pl
watchDirectory forums >> Plugins >> Run Multiple Tasks Zip and Email
http://www.watchdirectory.net/cgi-bin/yabb25/YaBB.pl?num=1406574104

Message started by Verne on Jul 28th, 2014 at 9:01pm

Title: Run Multiple Tasks Zip and Email
Post by Verne on Jul 28th, 2014 at 9:01pm
In the following link
http://www.watchdirectory.net/wdhelp/plugins/wdopMultiPlugin.html
It explains how to zip and email a file in multiple sub-tasks.

Quote:
Tip: Use the output-file of one SubTask as input for another SubTask

While you can not directly use the output of one SubTask as the input for another SubTask, here is a little trick that may help.

Suppose SubTask-1 ZIPs files, and you want SubTask-2 to email that ZIP to someone.

Configure SubTask-1 (the ZIP task) and set its Mask to "*.zip", also click the option so masks have reversed meaning. The effect will be that SubTask-1 will run for all files except ZIPs.

Configure SubTask-2 (the email task) and set its mask to "*.zip". Do not select the "reversed meaning" option.

Now I assume for this to work you would need to zip the file back into the same directory that the task is monitoring.

When I attempt to do this with Watch Directory I get the following error when I set the directory to monitor.  See attachment.

WD_ZipFiles.JPG (16 KB | 200 )

Title: Re: Run Multiple Tasks Zip and Email
Post by Verne on Jul 28th, 2014 at 9:29pm
Ugh.  I think this was user error again.
I initially tried to setup the multiple sub-task with only 1 sub-task.  I only had the zip sub-task defined.
Once I defined the zip sub-task and the email sub-task it worked fine.

WatchDirectory Forum » Powered by YaBB 2.5.2!
YaBB Forum Software © 2000-2017. All Rights Reserved.