Hi,
I'm using
Java 1.5. In a certain directory, I want to search for the presence of a file, say "a.txt" and if that exists, then create a file "a-1.txt". If there is an "a.txt" and an "a-1.txt" file, I want to create a "a-2.txt" file. Short of doing loops, is there a way I can check if a "a-#.txt" file exists, and what that # is using regular expressions somehow?
Thanks, - Dave