Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
How to get the date and time of file create in the Folder and compare to current date and time , to validation max of 6 hours of file is created or not like that we need to check.
Hi,
If I understand, you want to do some action for files created our modified for 6 hours or more.
tFileProperties give you many properties for a file, included number of milliseconds elapsed between EPOC (1970-01-01) and last modified date.
Here is an example:
tFlowToIterate generates a global variable for each property, so you can access those variables from anywhere after this component.
For example, you can test the value before to go to the next step.
In this example, tJava_3 represents this "next step", and the condition expressed in the "Run if" trigger is the following:
(TalendDate.getCurrentDate().getTime())-((Long)globalMap.get("row31.mtime")) > 6*3600*1000
So, the next step is executed only for files with "mtime" older than 6 hours (expressed in milliseconds).
Hope this helps.
Hi,
If I understand, you want to do some action for files created our modified for 6 hours or more.
tFileProperties give you many properties for a file, included number of milliseconds elapsed between EPOC (1970-01-01) and last modified date.
Here is an example:
tFlowToIterate generates a global variable for each property, so you can access those variables from anywhere after this component.
For example, you can test the value before to go to the next step.
In this example, tJava_3 represents this "next step", and the condition expressed in the "Run if" trigger is the following:
(TalendDate.getCurrentDate().getTime())-((Long)globalMap.get("row31.mtime")) > 6*3600*1000
So, the next step is executed only for files with "mtime" older than 6 hours (expressed in milliseconds).
Hope this helps.
Hello,
But what is the value of file name input in tFTPFilePropreties component!!
I have the same problem but i don't know what is a dynamic value which i can set in this input!!