Link to home
Start Free TrialLog in
Avatar of Ramesh4u
Ramesh4u

asked on

Creating directory using java ?


Could anyone tell me how to create a directory structure in my local drive ( I am using Unix stataion ) using java program.

Thanks

Ramesh
ASKER CERTIFIED SOLUTION
Avatar of Mick Barry
Mick Barry
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of illusionz70
illusionz70

try this..

String dirname = "your directory name"
File dir = new File(dirname);
  if(!dir.exists() )
         {
      dir.mkdirs();
            }
      
Avatar of Ramesh4u

ASKER

would mkdir works for all the operating system?
Yes... It will work for every operating system