To check is file hidden very simple, all what we need contains in java core.

Run this code:


File myFile = new File("c:\\myFile.txt");

if(myFile.isHidden()){
System.out.println("Hidden");
}else{
System.out.println("Not hidden");
}

Result: depends on file Hidden or Not hidden