Page 1 of 1
Monitor for new files and send an email
Posted: Tue Jun 09, 2009 1:20 pm
by dbortunk
Is there a way to monitor a folder tree (tree contains many subfolders) for any new or changed file and send an email for each file based on it's subfolder. Basically the new file would have to be able to go into a variable and then based on it's subfolder location send an email with that file name.
Monitor for new files and send an email
Posted: Tue Jun 09, 2009 11:08 pm
by Oleg
File monitor triggering event can monitor files in subfolders too. Turn on corresponding checkbox while adding the folder.
Also it can save the list of changed, deleted or added files in one file or in separated text files. Look at Save changes tab in the event editor.
Monitor for new files and send an email
Posted: Wed Jun 10, 2009 8:43 am
by dbortunk
I did that. It only works if i place one file in a folder. If i place three different files into the same folder or multiple folders, it only works for one file.
Monitor for new files and send an email
Posted: Wed Jun 10, 2009 9:14 am
by Oleg
Send me the example of your task.
We have tested this. It's working.
Monitor for new files and send an email
Posted: Wed Jun 10, 2009 9:15 am
by dbortunk
;*******************************
;* RoboTask Task file *
;* Do not edit in text editor! *
;*******************************
[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|-1
CatID=INTEGER|0
ContinueOnError=INTEGER|0
ExternalName=STRING|"Task11"
Hide=INTEGER|0
ID=INTEGER|1973519574
LogOnAsUser=INTEGER|1
Name=STRING|"Remove Empty Folder (c:\temp\a\*)..."
Priority=INTEGER|3
RunOnClose=INTEGER|0
RunOnStartup=INTEGER|0
ToLog=INTEGER|3
WriteGeneralLog=INTEGER|0
[Actions]
Action1=FOLDER
Action2=FOLDER
Action3=FOLDER
Action4=FOLDER
Action5=FOLDER
[Actions\Action1]
ActionID=STRING|"A_LOOP_FILE"
Enabled=INTEGER|-1
Name=STRING|"File Loop"
Params=FOLDER
[Actions\Action1\Params]
createmode=STRING|"1"
date1=STRING|"20090610"
date2=STRING|"20090610"
destvar=STRING|"CURRENTFOLDER"
DuringDays=STRING|"1"
DuringMonths=STRING|"1"
file0=STRING|"c:\temp\*"
filecount=STRING|"1"
OlderDays=STRING|"1"
OlderMonths=STRING|"1"
savesize=STRING|"0"
searchkind=STRING|"1"
subdirs=STRING|"1"
timesize=STRING|"0"
WithoutPath=STRING|"0"
[Actions\Action2]
ActionID=STRING|"A_FLOW_IF"
Enabled=INTEGER|-1
Name=STRING|"If Then"
Params=FOLDER
[Actions\Action2\Params]
case=STRING|"0"
operator=STRING|"0"
type=STRING|"0"
value1=STRING|"{FolderSize({CurrentFolder})}"
value2=STRING|"0"
[Actions\Action3]
ActionID=STRING|"A_FOLDER_REMOVE"
Enabled=INTEGER|-1
Name=STRING|"Remove Empty Folder ({CurrentFolder})"
Params=FOLDER
[Actions\Action3\Params]
deletefolder=STRING|"0"
folder=STRING|"{CurrentFolder}"
[Actions\Action4]
ActionID=STRING|"A_FLOW_ENDIF"
Enabled=INTEGER|-1
Name=STRING|"End If"
[Actions\Action5]
ActionID=STRING|"A_LOOP_END"
Enabled=INTEGER|-1
Name=STRING|"End Loop"
Monitor for new files and send an email
Posted: Wed Jun 10, 2009 9:49 am
by Oleg
Where is "File monitor" event in this task?
Monitor for new files and send an email
Posted: Wed Jun 10, 2009 9:53 am
by Oleg
BTW: this task is working well, I've just tested this on different variants
Monitor for new files and send an email
Posted: Wed Jun 10, 2009 10:13 am
by dbortunk
[Events]
Event1=FOLDER
[Events\Event1]
Enabled=INTEGER|-1
EventID=STRING|"E_FILE_MONITOR"
Params=FOLDER
[Events\Event1\Params]
chg=STRING|"0"
chga=STRING|"1"
chgsl=STRING|"1"
chgsm=STRING|"1"
chgtl=STRING|"1"
chgtm=STRING|"1"
del=STRING|"0"
folder1=STRING|"C:\incoming"
foldercount=STRING|"1"
id=STRING|"CDTRVYQP4"
incmask=STRING|"*.*"
interval=STRING|"10"
listmode=STRING|"2"
mon_files=STRING|"1"
mon_folders=STRING|"0"
new=STRING|"1"
newlist=STRING|"c:\new_files.txt"
saveresults=STRING|"1"
subfolders1=STRING|"1"