FileChangeTrigger - Get the name of the file which caused the trigger

uipath

#1

im using the FileChangeTrigger, i need to get the created time and exact file name which caused the trigger to be fired.

I have tried “NotifyFilters.FileName.ToString” however this just returns “FILENAME”

Is there a way to get the exact file name example ; XYZ.csv in the event handler using monitor events?

kind Regards

harri

@badita


File change trigger should say which file changed
#2

Hi @Haripriya,

In my example it basically gets the information from the file that was recently created. However, let’s wait for @badita’s answer or someone else, because in my example it will only work for files that were recently created, however it wouldn’t work if the user changes/deletes the previous files or something like this, it won’t get the information you need. I tried to get this information from NotifyFilters as well, but it was not possible :frowning:

Main.xaml (9.5 KB)

You may also try to change the order by using other properties and maybe it will achieve what you want:


#3

Hi,

Thanks for your response, but the solution is risky, i hope @badita could help us a little more with a proper solution to only get what was actually triggered.


#4

I’d be interested to find out how to do this as well. I can’t seem to get any information back from GetEventInfo after a FileChangeTrigger event. I have downloaded @acaciomelo example and this appears to be safe. Would you recommend using this approach?


#5

@acaciomelo I try to copy two files into monitor folder at the same time, but it sames doesn’t work by your example. It pop up the same info twice time. Do you have any good idea about this condition?


#6

Hello,
Can we use file system trigger in unattended mode - basically for bot running in the background