#1 2012-05-30 08:54:29

Elect2
Member
Registered: 2012-05-29
Posts: 31

tWaitForFile control doesnt react on same file names

Hi, is it possible to tWaitForFile react when file with same name is provided in directory to scan?

For example, if in directory to scan someone put a file with name 20120530.jpg and after some period put file with same name, tWaitForFile will not react.



Regards!

Offline

#2 2012-05-30 23:33:52

eost
Talend Team
Registered: 2010-12-07
Posts: 242

Re: tWaitForFile control doesnt react on same file names

Yes, it should trigger correctly if you select the appropriate value in the Trigger Action When property.

From Component Reference Guide:
Trigger action when Select the condition to be met for the action to be carried
out: A file is created A file is deleted A file is updated A file is created or updated or deleted.

There is also an option for Trigger Action when "a file is created, updated, or deleted"

Offline

#3 2012-05-31 10:43:40

Elect2
Member
Registered: 2012-05-29
Posts: 31

Re: tWaitForFile control doesnt react on same file names

Hi Edward, thank you for your answer.

Scenario is like this:
File is provided to directory -> tWaitForFile triggered action -> File is sent on mail -> File is moved to another directory

Now, problem is that if you provide a file with same name that was previously triggered tWaitForFile it wont be processed.

Offline

#4 2012-05-31 19:35:29

gusto2
Member
Company: Apogado
Registered: 2011-09-27
Posts: 164
Website

Re: tWaitForFile control doesnt react on same file names

Hi,

indeed tWaitForFile remembets processed files, so a file is processed only once.If you want to receive other events, set the switch "Trigger action when" tp "a file is created, updated or deleted". You will receive other events too (you can filter out what you need e.g. create or update)

To test, don't use "the same" file, at least update (touch) it, so update is recognized

Gabriel


Gabriel Vince
Senior Consultant
Apogado
www.apogado.com

Offline

#5 2012-06-01 14:48:39

Elect2
Member
Registered: 2012-05-29
Posts: 31

Re: tWaitForFile control doesnt react on same file names

Hi Gabriel, setting "Trigger action when" property to "a file is created or updated or deleted" indeed is a kind of solution, but problem is that tWaitForFile will trigger action in deleting a file as well as in file creating which may much complicate programs.

Offline

#6 2012-06-01 14:53:51

gusto2
Member
Company: Apogado
Registered: 2011-09-27
Posts: 164
Website

Re: tWaitForFile control doesnt react on same file names

Indeed smile that's why I wrote to filter other events, e.g. using tFilterRow to get create and update events and throw out deletes if there are not useful..

have fun
         Gabriel


Gabriel Vince
Senior Consultant
Apogado
www.apogado.com

Offline

Board footer

Powered by FluxBB