How to use the regular expression in FileStat:getFileStatus to get a file having name shorter then others in the same folder?
book
Article ID: KB0092821
calendar_today
Updated On:
Products
Versions
TIBCO Hawk
-
Not Applicable
-
Description
Resolution: Suppose that two files “test.txt” and “test.txt.old” exist under the same directory and FileStat:getFileStatus method is used to get the status of only “test.txt” file, please set the input parameter for file name as “text.txt$”. If “text.txt” is put as a file name, it will return both files. Please note, if there is no “.” in the file name then Hawk agent will not treat the file name as a regular expression. So this solution only works when the file name has “.” in.
Issue/Introduction
How to use the regular expression in FileStat:getFileStatus to get a file having name shorter then others in the same folder?