Creating directories in remote PC using Java -


i need create directory in pc using java, used file class,
code structure is

    string path = "\\\\192.148.64.99"+file.separator+"d:"+file.separator+"hello";                string fname= path+file.separator+"sample.pdf";     file file = new file(fname);     system.out.println("exists"+file.exists());     file.getparentfile().mkdirs();    

this throwing error.

d: in path constructing not valid. use d$ instead if admin on remote machine. path should \\machinename\sharename\folder\subfolder...


Comments

Popular posts from this blog

javascript - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -