title: Read unknown file names from directory
body: <p>I would like to read a file from a directory. In this directory there are eight additional files with the same extension (.csv). Likewise, the file name is not directly known.
  The name of the file looks like this:</p>
  
  <p>test_file_1_2017_06_24.csv</p>
  
  <p>It can change however, if I call the directory the next day . Then the file name is:</p>
  
  <p>test_file_2_2017_06_25.csv or test_file_1_2017_06_25. </p>
  
  <p>The name of the file and the date change.
  Is there a way to read the file "variable" in Java or to read the file but don´t know the exactly name? The directory is always the same ("H:/) (After the file read, then the file respectively the resulting string is furtherprocessed with split() ).
  Thanks for helpfull answers! </p>
  
  <p>Edit: Read the directory and shows only csv-Files</p>
  
  <pre><code>File dir = new File("H:/");
  
      File[] fileArray = dir.listFiles(new FilenameFilter() {  
  
          public boolean accept(File dir, String name) {
              return name.endsWith(".csv");
          }
      });
      for(File f: fileArray){
          System.out.println(f.getName());
      }
  </code></pre>