I'd like to create a folder in the C:\ root location. I have a program which does this.
On my computer, this creates a folder called Test under C:\MyPrograms\Java\Test
How would I change the code above to create a folder under C:\Test, without specifying the C:\ prefix? If I ran my program under F:\MyPrograms\Java\Test, how could I achieve get the folder under F:\Test?
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Joined: May 08, 2007
ok ilja !! i tried this it works the folder gets created in E drive.
Joined: May 30, 2005
Originally posted by Ilja Preuss: File f = new File("/Test"); f.mkdir();