 |
hiteksoftware.com User discussion forum
|
View previous topic :: View next topic |
Author |
Message |
melvin Site Admin
Joined: 25 May 2006 Posts: 635 Location: Santa Barbara, california
|
Posted: Fri Aug 25, 2006 3:30 pm Post subject: Script: Kick off a task if 13 out of 13 files exist |
|
|
This is an email support request:
I need to kick off a task ONLY if all thirteen of thirteen files exist.
Is this possible? |
|
Back to top |
|
 |
melvin Site Admin
Joined: 25 May 2006 Posts: 635 Location: Santa Barbara, california
|
Posted: Fri Aug 25, 2006 3:32 pm Post subject: |
|
|
2 ways to do this:
1) Use 13 file monitor tasks in sequence in a chain. If all 13 return exit code = -100, run the 14th step , i.e. the task you need. Else exit the chain at any step if exit code = 0.
OR
2) Use a script task in Automize Professional or Enterprise:
import com.hitek.engine.mods.script.Script;
File f1 = new File("c:\\test\\dir1", "name1");
File f2 = new File("c:\\test\\dir2", "name2");
...
File f13 = new File("c:\\test\\dir13", "name13");
if(f1.exists() && f2.exists()....... && f13.exists())
{
Script.out("All files exist.");
Script.run("task_title");
}
else
{
Script.out("One or more files are missing.");
} |
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|