Open a file that I dont know it exactly name: patterns?
Hi,
I must open a file but I dont know the exactly name, only it finish letters:
For example, I have the next files:
21_4_2007_SLOT.txt
21_4_2007_HALF.txt
21_4_2007_ALL.txt
And I must open only the file that finishes with _SLOT.txt
The first part of the file name changes depending the date (for example) so I cant use that.
For example, in this code:
byte[] data =null;
try{
in =new FileInputStream(fileName);
data =newbyte[in.available()];
in.read(data);
}catch (Exception e){
e.printStackTrace();
}
So I would like to change fileName for a pattern like *_SLOT.txt.
Can I do this using Java?

