Page 1 of 1
Folder monitoring and calling a script
Posted: Thu Sep 28, 2006 3:52 am
by ann_l
I want a task to be set to watch for new files / folders in a
particular directory. Whenever a new file is dropped in the particular
directory, some commandline scripts should run automatically. Can
anyone help me out in achieving this.
Thanks,
Ann.
Folder monitoring and calling a script
Posted: Thu Sep 28, 2006 8:32 am
by Oleg
You can make such task with using "File monitor" triggering event.
How to use file monitor you can see in the following examples:
File monitor demo 1.tsk - this task monotores the folder c:\incomong and enumerates new files when they arrived.
Show -Folder Changed-.tsk - this task monitores all changes in folder c:\temp and shows the list of new files, changed files, and deleted files in the folder when changes was happened.
Alse you can find more examples here
Save the task into the file and use menu "Task | Import" to import into RoboTask. Don't forget to enable each task after importing
Folder monitoring and calling a script
Posted: Thu Sep 28, 2006 9:34 pm
by ann_l
Thanks for you reply. I dont find any examples of how to intitiate a script from commandline through robotask.My requirement is when a new folder/file arrives, i wanted a script to run from the commandline.Also, is there any tool similar to robotask for linux. Any ideas on how file monitoring can be done in linux.
Folder monitoring and calling a script
Posted: Thu Sep 28, 2006 10:49 pm
by Oleg
What script did you mean? VB-script or something else? Describe in more detail, please.
You can start all command-line utilities by "Run program/Open document" action.
Folder monitoring and calling a script
Posted: Thu Sep 28, 2006 11:28 pm
by ann_l
I wanted to run a php script whnever a new file is dropped in a particular directory. Something like below:php callscript.php arg1 arg2
Folder monitoring and calling a script
Posted: Fri Sep 29, 2006 1:02 am
by Oleg
What is the problem?
Use "Run program/Open document" action and write the following:
php - into "Program or Document name" ("php" is a command-line interpreter of php scripts. Isn't it?)
callscript.php arg1 arg2 - into "Parameters"
Also, I think, that you must specify the full path to callscript.php (e.g. "c:\my folder\scripts\callscript.php")