Java tutorial
import java.io.File; import java.net.URI; import java.net.URISyntaxException; public class Main { public static void main(String[] args) { File aFile; try { aFile = new File(new URI("file:///c:/a.bat")); System.out.println(aFile.getName());//false } catch (URISyntaxException e) { e.printStackTrace(); } } }