Sometimes we usually meet a situation like, we want to access a shared folder in windows environment remotely. So this is one of the simplest way to do so :-
File file = new File("\\\\theRemoteIP\\webapps");
File[] files = file.listFiles(); System.out.println("Access granted"); for (int i = 0; i < files.length; i++) { String fname = files[i].getName(); System.out.println(fname); }
0 comments:
Post a Comment