This discussion is archived
9 Replies Latest reply: Oct 13, 2008 6:22 PM by 807589 RSS

Similar technique to .hasNext() for reading in multiple files?

807589 Newbie
Currently Being Moderated
Hi, if I want to point to a directory and have a java app go through each of the files one by one to rename them according to a naming scheme (e.g. newFile1, newFile2,...), is there a technique similar to Scanner's hasNext method to navigate through the files and know when to stop?

I haven't been able to find much while searching around.