I want to read all the file names in a directory, which works so far except the checking for a specific file.
It is for a little statistic program that checks for "created", "deleted" and "edited" Entity files.

I want to search for the name of an Entity file 
(e.g. if the entity "aposting" exists, the value of "created" or "edited" would be increased by one, but 
if no entity with this name is in the directory, the "deleted" value would be increased by one).

my code:

```
package Statistik;

import java.io.File;
import java.util.Arrays;

/**
 *
 * @author KyoAkashi
 */
public class Statistik {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        File folder = new File("C:\\Users\\Administrator\\Desktop\\Namens Test");
        File[] FileNames = folder.listFiles();

        for (int i = 0; i < FileNames.length; i++) {
            if (FileNames[i].isFile()) {
                System.out.println("File " + FileNames[i].getName());
            } else if (FileNames[i].isDirectory()) {
                System.out.println("Directory " + FileNames[i].getName());
            }
        }
        if(Arrays.asList(FileNames).contains("File 001.txt")){
            System.out.println("it exists");
        }
        else
            System.out.println("it doesn't exist");
    }

}

```

**EDIT:**
as from jon skeet requestet:

* i extended my question above
* my desired output is: "it exists" for a file in this directory
* i've also tried to make a new File and it didnt work as described above
* there is no error message just not the result it should be