Set up Monitor for multiple files

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

nishantmathur

Posts: 9
Joined: Thu May 15, 2014 10:47 am

Post by nishantmathur » Mon Jul 14, 2014 4:50 pm
Hello Everyone

Has anyone tried to setup a "Monitor" on multiple file. I want to set up a file create monitor on 10 files in a linux directory. Once all 11 files (*.txt) are found I want to call my project.

This works perfectly fine with one file to monitor, but somehow I can't get it to work with more than one file.

Thanks in advance for your help :)

Thanks

Support_Jon

Support Specialist
Posts: 62
Joined: Thu Jul 19, 2012 9:15 am
Location: Ashland, NE

Post by Support_Jon » Tue Jul 15, 2014 9:06 am
Hello,

Since Montiors will check the files every 15 seconds, what was new 15 seconds ago is no longer considered new (created) now.

There are two ways you can address your need:

Option 1 - Using a Monitor
Setup a Files Created Monitor, setup a project that will take the files from the monitor.fileList and write the details out to a CSV file or similar. Then when your CSV file reaches over 10 records, you can process those files and clear out then clear out the CSV file. Depending on what all you are doing with the files, it is possible you could run into an issue if processing goes beyond 15 seconds. There are some additional steps that could be taken to help with this if needed.

Option 2 - Using a Scheduler
Setup a scheduler to run as frequently as you need. Then in your project, have it get a list of files in the desired directory and check the count of files present. When it reaches over 10 files, then process them. Once you process a file, you will want to make sure you archive (move) it to a different directory so that it doesn't get processed twice.


Either option should suit your needs just fine. Depending on the extent of your processing of the files, one option may be a better choice over the other. Feel free to provide more detail if you'd like guidance in making your selection.

Thanks - Jon

nishantmathur

Posts: 9
Joined: Thu May 15, 2014 10:47 am

Post by nishantmathur » Tue Jul 15, 2014 9:50 am
Thanks Jon,

I will give both options a try and get back to you in case of any further questions

nishantmathur

Posts: 9
Joined: Thu May 15, 2014 10:47 am

Post by nishantmathur » Fri Jul 18, 2014 10:55 am
Just to close loop on this topic -

I created a project which checks for number of files (if loop) and a monitor which call this project for each file that arrives on server... Job done.

Thanks
4 posts Page 1 of 1