Original question: How to check the server's C: / Is there Test.jpg this file (do not know the extension) ================== First, define a FILEFILTER's instance private Static filefilter filefilter = new filefilter () {pUBLIC Boolean Accept (file pathname) {string tmp = pathname.getName (). TOLOWERCASE (); if (tmp.endswith (". jar") || tmp.endswith (". zip ")) {Return true;}}}}; this is an example I wrote, as long as the extension is JAR or ZIP, you can change to TMP.Startwith (" Test. "). You can also do more judgments, can also be used as a regular expression. Then: file root = new file ("c: //"); file [] files = root.listfiles (filefilter); this time, it is possible to know that the size and content of the files can be found in the C: / directory. What file is.