Monitor folder
Monitor folder
How would you create a task to monitor if a folder exists and if it does not exist send an email and create the folder and continue monitoring if it exists?
Monitor folder
IMHO, it's better to make two tasks.
First task monitors the folder c:\MyFolder (see "file monitor" triggering event)
Second task checks the existence of the folder and creates if it doesn't exist.
If {FolderExists(c:\MyFolder)}=false then
create folder "c:\MyFolder"
end if
Second task may be triggered by Cyclic event. (suppose, each 15 sec)
First task monitors the folder c:\MyFolder (see "file monitor" triggering event)
Second task checks the existence of the folder and creates if it doesn't exist.
If {FolderExists(c:\MyFolder)}=false then
create folder "c:\MyFolder"
end if
Second task may be triggered by Cyclic event. (suppose, each 15 sec)
Monitor folder
I don't see how you setup the file monitor to watch for a folder existing or not.
Monitor folder
See my previous post. You don't need file monitor to check existence of the folder.
Also see the task below:
;*******************************
;* RoboTask Task file
;* Do not edit in text editor!
;*******************************
[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|-1
CatID=INTEGER|1380072790
ContinueOnError=INTEGER|0
Events=FOLDER
ExternalName=STRING|"Task785"
Hide=INTEGER|0
ID=INTEGER|101531131
LogOnAsUser=INTEGER|1
Name=STRING|"Check the folder existence"
Priority=INTEGER|3
RunOnClose=INTEGER|0
RunOnStartup=INTEGER|0
ToLog=INTEGER|3
WriteGeneralLog=INTEGER|0
[Actions]
Action1=FOLDER
Action2=FOLDER
Action3=FOLDER
[Actions\Action1]
ActionID=STRING|"A_FLOW_IF"
Enabled=INTEGER|-1
Name=STRING|"If Then"
Params=FOLDER
[Actions\Action1\Params]
case=STRING|"0"
operator=STRING|"1"
type=STRING|"3"
value1=STRING|"{FolderExists(c:\testfolder)}"
[Actions\Action2]
ActionID=STRING|"A_FOLDER_CREATE"
Enabled=INTEGER|-1
Name=STRING|"Create Folder (c:\testfolder)"
Params=FOLDER
[Actions\Action2\Params]
newfolder=STRING|"c:\testfolder"
[Actions\Action3]
ActionID=STRING|"A_FLOW_ENDIF"
Enabled=INTEGER|-1
Name=STRING|"End If"
[Events]
Event1=FOLDER
[Events\Event1]
Enabled=INTEGER|-1
EventID=STRING|"E_GENERAL_CYCLIC"
Params=FOLDER
[Events\Event1\Params]
id=STRING|"C1TFCGHI"
interval=STRING|"15"
Also see the task below:
;*******************************
;* RoboTask Task file
;* Do not edit in text editor!
;*******************************
[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|-1
CatID=INTEGER|1380072790
ContinueOnError=INTEGER|0
Events=FOLDER
ExternalName=STRING|"Task785"
Hide=INTEGER|0
ID=INTEGER|101531131
LogOnAsUser=INTEGER|1
Name=STRING|"Check the folder existence"
Priority=INTEGER|3
RunOnClose=INTEGER|0
RunOnStartup=INTEGER|0
ToLog=INTEGER|3
WriteGeneralLog=INTEGER|0
[Actions]
Action1=FOLDER
Action2=FOLDER
Action3=FOLDER
[Actions\Action1]
ActionID=STRING|"A_FLOW_IF"
Enabled=INTEGER|-1
Name=STRING|"If Then"
Params=FOLDER
[Actions\Action1\Params]
case=STRING|"0"
operator=STRING|"1"
type=STRING|"3"
value1=STRING|"{FolderExists(c:\testfolder)}"
[Actions\Action2]
ActionID=STRING|"A_FOLDER_CREATE"
Enabled=INTEGER|-1
Name=STRING|"Create Folder (c:\testfolder)"
Params=FOLDER
[Actions\Action2\Params]
newfolder=STRING|"c:\testfolder"
[Actions\Action3]
ActionID=STRING|"A_FLOW_ENDIF"
Enabled=INTEGER|-1
Name=STRING|"End If"
[Events]
Event1=FOLDER
[Events\Event1]
Enabled=INTEGER|-1
EventID=STRING|"E_GENERAL_CYCLIC"
Params=FOLDER
[Events\Event1\Params]
id=STRING|"C1TFCGHI"
interval=STRING|"15"
Last edited by Oleg on Tue Jun 09, 2009 2:54 pm, edited 1 time in total.