Created 06-07-2016 09:16 AM
Created 06-07-2016 09:20 AM
If your files are located on local file system you may use ListFile processor. This processor has properties accepting the use of expression language. Using date functions of expression language [1], you can filter the files you list based on the timestamp (if the filenames contain timestamp).
Regarding your second question, you can use the File filter property in ListFile processor which accepts a regular expression. It allows you to exclude some extensions if you don't want to list .xls and .xlsx files.
[1] https://nifi.apache.org/docs/nifi-docs/html/expression-language-guide.html#dates
Created 06-07-2016 09:20 AM
If your files are located on local file system you may use ListFile processor. This processor has properties accepting the use of expression language. Using date functions of expression language [1], you can filter the files you list based on the timestamp (if the filenames contain timestamp).
Regarding your second question, you can use the File filter property in ListFile processor which accepts a regular expression. It allows you to exclude some extensions if you don't want to list .xls and .xlsx files.
[1] https://nifi.apache.org/docs/nifi-docs/html/expression-language-guide.html#dates
Created 06-07-2016 10:54 AM
Thanks@ Pierre Villard
I'm using Windows Nifi how to list files using time stamp...
in File filter we the default as [^\.].* . we can change * as which ever file format but suppose i don't want .xls file. how can i apply not in [^\.].xls.
Created 06-07-2016 11:12 AM
- I don't understand what is the problem with Windows. Do your files contain timestamps in the filename? If yes, you can use regular expression to filter on the filename based on the date.
- If you want all files having an extension but with the extension not being equal to .xls or .xlsx, you can use the following regular expression:
^.*\.(?!xls$|xlsx$)[^.]+$
I would recommend you testing your regular expressions on this website : http://regexr.com/
This site provides a "explain tab" giving information regarding the regular expression and how it works.
Created 06-07-2016 12:27 PM
This (^.*\.(?!xls$|xlsx$)[^.]+$) operators is not working for me..it doesn't list any files. in my directory having two excel files and 1 .txt file and .xml file but it not list any....
Created on 06-07-2016 12:53 PM - edited 08-19-2019 03:15 AM
This works for me.
Created 06-08-2016 06:44 AM
now working...
Thanks
Iyappan