I'd like to create a file object as follows
File file = new File("MyFile-abcdfg.txt");
where the string between -
and .
is random and always changing. The length is also not the same.
I want to check the file.exist()
, but the problem is I am not sure what will be the name of the file, as it keeps on changing.