Page 1 of 1
File monitor
Posted: Wed Jan 04, 2006 9:59 pm
by NoMercy
Hi,
I have 10 folders.
One task is watching by Filemonitor all these folders. I take a copy when a new files arrives to a archive.
I have also one task in each folder with Filemonitor. Here I do diffrent things with my files. And last I delete the file.
I will always run the first task(archive) before the other tasks.
Is there a solution?
Regards
File monitor
Posted: Wed Jan 04, 2006 10:27 pm
by Oleg
I've understood you so:
When new file was arrived, you put a copy into archive.
Next you process some operations with this file and delete it.
File monitor can save list of new files. You can process these files within task by using text loop.
I'm sorry, I haven't understood your question. Do you want an example?
File monitor
Posted: Thu Jan 05, 2006 12:46 am
by NoMercy
Yes, a example perhaps helps me.
(I am a registered user of Robotask)
File monitor
Posted: Fri Jan 06, 2006 9:56 am
by Oleg
See an example below. This task monitores new files in folder c:\incoming. When new files are appeared, file monitor saves list of new files into file c:\new_files.txt and launches the task.
Save text of the task into file and use menu Task | Import to import into RoboTask. Don't forget to enable the task after importing.
;**********************
;* RoboTask Task file *
;* Do not edit! *
;**********************
[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|-1
CatID=INTEGER|565106205
ContinueOnError=INTEGER|0
Events=FOLDER
ExternalName=STRING|"Task365"
Hide=INTEGER|0
ID=INTEGER|760359653
Name=STRING|"File monitor demo"
Priority=INTEGER|3
RunOnClose=INTEGER|0
RunOnStartup=INTEGER|0
ToLog=INTEGER|3
[Actions]
Action1=FOLDER
Action2=FOLDER
Action3=FOLDER
[Actions\Action1]
ActionID=STRING|"A_LOOP_TEXT"
Enabled=INTEGER|-1
Name=STRING|"Text Loop"
Params=FOLDER
[Actions\Action1\Params]
destvar=STRING|"NEW_FILE"
file=STRING|"c:\new_files.txt"
linecount=STRING|"0"
sourcetext=STRING|"0"
[Actions\Action2]
ActionID=STRING|"A_DIALOG_MESSAGE"
Enabled=INTEGER|-1
Name=STRING|"Show ""New file ""{New_file}"" can be processed!"""
Params=FOLDER
[Actions\Action2\Params]
icon=STRING|"1"
msg0=STRING|"New file ""{New_file}"" can be processed!"
msgcount=STRING|"1"
playsound=STRING|"0"
showmessage=STRING|"1"
[Actions\Action3]
ActionID=STRING|"A_LOOP_END"
Enabled=INTEGER|-1
Name=STRING|"End Loop"
[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|"40266N99M"
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"