Java for Testers – Select XML files in a directory


This post gives you the material to select or filter files in a directory. It is not a ‘real’ tutorial, but rather gives you means to play with the code with immediate results. By playing you get quicker understanding how things work. At least I do. The code filters xml-files, but by changing one line of code you can filter any extension you wish. After you ran the java program you end up having a text file containing the list of files which met your criteria. I do suppose you already have finished the part with succes. Otherwise finish this first. YouTube is full of HelloWorlds. You can use this project or create a new fresh one if you prefer.

Continue reading “Java for Testers – Select XML files in a directory”