Tag Archives: Filter files within a directory

A simple way to list/filter files

Here is a very simple and elegant way to list or filter the files in a given directory. For this use the File.listFiles() method of java.io.File class. The example below deletes all the files that end with the “.tmp” extension. … Continue reading

Posted in Java | Tagged , | Leave a comment