Page 1 of 1

Pop up notification with modified file name in a directory?

Posted: Wed Jan 11, 2023 3:43 am
by anthonyystwarty
Hello. I know robotask has "file monitor" function, the question is:
When I create or modify a file inside the folder, is there any command that shows the name of the file that was created or modified? and that a popup of this modification appears to me? I hope you understand my question. Thank you again.

Re: Pop up notification with modified file name in a directory?

Posted: Wed Jan 11, 2023 10:33 am
by Oleg
is there any command that shows the name of the file that was created or modified?
You can save the list of changed files to text file: to one file or separate files. See Save to file tab
Image

Also you can pass these lists to the task. See Save to task Variables tab
Image

Next you can process these lists as you wish

Re: Pop up notification with modified file name in a directory?

Posted: Thu Jan 12, 2023 2:42 am
by anthonyystwarty
Hello. Thank you for the answer, but I couldn't get it to work as I would like, unfortunately. I tried to do something similar to what High Criteria's File Alert Monitor does.

Re: Pop up notification with modified file name in a directory?

Posted: Thu Jan 12, 2023 10:25 am
by Oleg
Look at my small example (below)
Save the text of the task to a file and use menu Task->Import to import the task into RoboTask.
Also you can simply copy task text and paste it into the task list.
Do not forget to enable the task after importing.

You can send these lists to email or write to some log or database.

Code: Select all

;*****************************
;* RoboTask Task file
;* Do not edit in text editor!
;*****************************
 
[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|-1
CatID=INTEGER|693415217
Comment=STRINGLIST
ContinueOnError=INTEGER|0
DisableOnError=INTEGER|0
DoNotStopWhenShutdown=INTEGER|0
Events=FOLDER
ExternalName=STRING|"Task38"
Hide=INTEGER|0
ID=INTEGER|1353709377
LogOnAsUser=INTEGER|1
Name=STRING|"File alert"
OnErrorTaskID=INTEGER|-1
Priority=INTEGER|3
RunOnClose=INTEGER|0
RunOnStartup=INTEGER|0
ToLog=INTEGER|3
UnicodeFormat=INTEGER|1
WriteGeneralLog=INTEGER|0

[Actions]
Action1=FOLDER
Action2=FOLDER
Action3=FOLDER
Action4=FOLDER

[Actions\Action1]
ActionID=STRING|"A_VARIABLES_CREATE"
Enabled=INTEGER|-1
Name=STRING|"Create local variable ""FileList"" with value ""{UniqueFileName({TempDir}\*.txt)}"""
Params=FOLDER

[Actions\Action1\Params]
expand=STRING|"1"
linecount=STRING|"1"
varkind=STRING|"1"
varname=STRING|"FileList"
varvalue=STRING|"{UniqueFileName({TempDir}\*.txt)}"

[Actions\Action2]
ActionID=STRING|"A_FILE_TEXTWRITE"
Enabled=INTEGER|-1
Name=STRING|"Create text file {FileList}"
Params=FOLDER

[Actions\Action2\Params]
encode=STRING|"0"
fileexists=STRING|"0"
filname=STRING|"{FileList}"
line0=STRING|"Time: {DateTime}"
line2=STRING|"New files:"
line3=STRING|"{NewFiles}"
line5=STRING|"Deleted files:"
line6=STRING|"{DeletedFiles}"
line8=STRING|"Changed files:"
line9=STRING|"{ChangedFiles}"
linecount=STRING|"10"
suppress=STRING|"0"

[Actions\Action3]
ActionID=STRING|"A_GENERAL_RUN_PROG"
Enabled=INTEGER|-1
Name=STRING|"Run ""{FileList} """
Params=FOLDER

[Actions\Action3\Params]
ifnonzero=STRING|"0"
program=STRING|"{FileList}"
runas=STRING|"0"
wait=STRING|"0"

[Actions\Action4]
ActionID=STRING|"A_DIALOG_MESSAGE"
Enabled=INTEGER|-1
Name=STRING|"Play sound"
Params=FOLDER

[Actions\Action4\Params]
icon=STRING|"1"
msg0=STRING|"[{Time}, {DayOfWeek}, {Date}]"
msg1=STRING|"Hey, awake!"
msgcount=STRING|"2"
playsound=STRING|"1"
showmessage=STRING|"0"
wavefile=STRING|"C:\Program Files (x86)\Microsoft Office\Office14\Groove\Sounds\Places\ALARM.WAV"

[Events]
Event1=FOLDER

[Events\Event1]
Enabled=INTEGER|-1
EventID=STRING|"E_FILE_MONITOR"
Name=STRING|"File Monitor"
Params=FOLDER
UniqueID=INTEGER|1465055032

[Events\Event1\Params]
chg=STRING|"1"
chga=STRING|"1"
chglistparameter=STRING|"changedfiles"
chgsl=STRING|"1"
chgsm=STRING|"1"
chgtl=STRING|"1"
chgtm=STRING|"1"
del=STRING|"1"
dellistparameter=STRING|"deletedfiles"
folder1=STRING|"C:\temp"
foldercount=STRING|"1"
incmask=STRING|"*.*"
interval=STRING|"15"
listmode=STRING|"1"
mon_files=STRING|"1"
mon_folders=STRING|"0"
new=STRING|"1"
newlistparameter=STRING|"newfiles"
notsavestatus=STRING|"1"
pass=STRING|"1"
passmode=STRING|"2"
required=STRING|"1"
saveresults=STRING|"0"
subfolders1=STRING|"1"


Re: Pop up notification with modified file name in a directory?

Posted: Wed Jan 18, 2023 2:46 am
by anthonyystwarty
Oleg wrote: Thu Jan 12, 2023 10:25 am Look at my small example (below)
Save the text of the task to a file and use menu Task->Import to import the task into RoboTask.
Also you can simply copy task text and paste it into the task list.
Do not forget to enable the task after importing.

You can send these lists to email or write to some log or database.

Code: Select all

;*****************************
;* RoboTask Task file
;* Do not edit in text editor!
;*****************************
 
[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|-1
CatID=INTEGER|693415217
Comment=STRINGLIST
ContinueOnError=INTEGER|0
DisableOnError=INTEGER|0
DoNotStopWhenShutdown=INTEGER|0
Events=FOLDER
ExternalName=STRING|"Task38"
Hide=INTEGER|0
ID=INTEGER|1353709377
LogOnAsUser=INTEGER|1
Name=STRING|"File alert"
OnErrorTaskID=INTEGER|-1
Priority=INTEGER|3
RunOnClose=INTEGER|0
RunOnStartup=INTEGER|0
ToLog=INTEGER|3
UnicodeFormat=INTEGER|1
WriteGeneralLog=INTEGER|0

[Actions]
Action1=FOLDER
Action2=FOLDER
Action3=FOLDER
Action4=FOLDER

[Actions\Action1]
ActionID=STRING|"A_VARIABLES_CREATE"
Enabled=INTEGER|-1
Name=STRING|"Create local variable ""FileList"" with value ""{UniqueFileName({TempDir}\*.txt)}"""
Params=FOLDER

[Actions\Action1\Params]
expand=STRING|"1"
linecount=STRING|"1"
varkind=STRING|"1"
varname=STRING|"FileList"
varvalue=STRING|"{UniqueFileName({TempDir}\*.txt)}"

[Actions\Action2]
ActionID=STRING|"A_FILE_TEXTWRITE"
Enabled=INTEGER|-1
Name=STRING|"Create text file {FileList}"
Params=FOLDER

[Actions\Action2\Params]
encode=STRING|"0"
fileexists=STRING|"0"
filname=STRING|"{FileList}"
line0=STRING|"Time: {DateTime}"
line2=STRING|"New files:"
line3=STRING|"{NewFiles}"
line5=STRING|"Deleted files:"
line6=STRING|"{DeletedFiles}"
line8=STRING|"Changed files:"
line9=STRING|"{ChangedFiles}"
linecount=STRING|"10"
suppress=STRING|"0"

[Actions\Action3]
ActionID=STRING|"A_GENERAL_RUN_PROG"
Enabled=INTEGER|-1
Name=STRING|"Run ""{FileList} """
Params=FOLDER

[Actions\Action3\Params]
ifnonzero=STRING|"0"
program=STRING|"{FileList}"
runas=STRING|"0"
wait=STRING|"0"

[Actions\Action4]
ActionID=STRING|"A_DIALOG_MESSAGE"
Enabled=INTEGER|-1
Name=STRING|"Play sound"
Params=FOLDER

[Actions\Action4\Params]
icon=STRING|"1"
msg0=STRING|"[{Time}, {DayOfWeek}, {Date}]"
msg1=STRING|"Hey, awake!"
msgcount=STRING|"2"
playsound=STRING|"1"
showmessage=STRING|"0"
wavefile=STRING|"C:\Program Files (x86)\Microsoft Office\Office14\Groove\Sounds\Places\ALARM.WAV"

[Events]
Event1=FOLDER

[Events\Event1]
Enabled=INTEGER|-1
EventID=STRING|"E_FILE_MONITOR"
Name=STRING|"File Monitor"
Params=FOLDER
UniqueID=INTEGER|1465055032

[Events\Event1\Params]
chg=STRING|"1"
chga=STRING|"1"
chglistparameter=STRING|"changedfiles"
chgsl=STRING|"1"
chgsm=STRING|"1"
chgtl=STRING|"1"
chgtm=STRING|"1"
del=STRING|"1"
dellistparameter=STRING|"deletedfiles"
folder1=STRING|"C:\temp"
foldercount=STRING|"1"
incmask=STRING|"*.*"
interval=STRING|"15"
listmode=STRING|"1"
mon_files=STRING|"1"
mon_folders=STRING|"0"
new=STRING|"1"
newlistparameter=STRING|"newfiles"
notsavestatus=STRING|"1"
pass=STRING|"1"
passmode=STRING|"2"
required=STRING|"1"
saveresults=STRING|"0"
subfolders1=STRING|"1"

Apologies for the delay in response. It worked perfectly as I wanted. You and Robotask are very smart. Thank you.