I have created a CON, PRN folder(http://www.hoax-slayer.com/con-folder-name.shtml) using "md\\.\\c:\con " through DOS prompt, i was trying to create same CON and PRN folder through Java code using
But it is giving following Exception :
Cannot run program "md\\.\d:\con": CreateProcess error=2, The system cannot find the file specified at java.lang.ProcessBuilder.start(Unknown Source)"
Please guide me how to make the CON folder through JAVA code.
Any good reason to mess around with Runtime when you do the same with mkdir() method of File class?
I want to create a CON name folder, which is normally not possible with mkdir(); (As this is OS reserved Word) that's why i tried it out with "Runtime.getRuntime().exec("mkdir c:\con\\");" because DOS prompt allows us to create CON folder with "mkdir c:\con\".
Just give us one good reason why it MUST BE called con and not something else?
Hi.. i want to create a folder which can not be rename and delete.. by any user(even admin).CON,PRN,NUL,AUX.. etc are some of Folder's name which OS has reserved(which restrict rename and deletion).. so just to put restriction over my folder i want to use con name for my folder
P.S. that reasoning, as well as that command, will work just oh so well on unix platforms, as well, huh?
Thanks for reply.
Yes i had gone through the article link, which you had provided.
I had tried the way explained in the article, but still facing the same problem
Firstly i want to make it work with windows.. as these CON,PRN are WINDOWS reserved word, it is not working in windows..