View Single Post
  #2 (permalink)  
Old 01-04-2008, 09:45 PM
roots's Avatar
roots roots is offline
Moderator
 
Join Date: Jan 2008
Location: Dallas
Posts: 263
roots is on a distinguished road
Code:
File file = new File("directory path"); if(file.exists()){ System.out.println("File Exists"); }else{ boolean wasDirecotyMade = file.mkdirs(); if(wasDirecotyMade)System.out.println("Direcoty Created"); else System.out.println("Sorry could not create directory"); }
One more thing .. check java documentation for mkdir() and mkdirs() .. they are different and better if you could find that yourself...
hope it helps ..
__________________
dont worry newbie, we got you covered.
Reply With Quote