Home Tutorialhelp Comment With this u can create any no of folders,

 
 

Comment

Viper
With this u can create any no of folders,,
March 4, 2009 at 3:47 PM

import java.io.*;
class CreateDirectory
{
public static void main(String args[])
{
try{
// String strDirectoy ="test";
String strManyDirectories="1/2/3/4";

/* Create one directory
boolean success = (new File(strDirectoy)).mkdir();
if (success) {
System.out.println("Directory: " + strDirectoy + " created");
}
*/




int i,j,k,l;
for( i=1;i<5;i++)
for( j=1;j<5;j++)
for( k=1;k<5;k++)
for( l=1;l<5;l++)
{

strManyDirectories = String.format("%d/%d/%d/%d",i,j,k,l);

(new File(strManyDirectories)).mkdirs();
}

}catch (Exception e){//Catch exception if any
System.err.println("Error: " + e.getMessage());
}
}
}




View All Comments | View Tutorial
Advertisement
Related Tutorial and Articles
Java Beginners

create folders and sub folders based on excel data
create folders and sub folders based on excel data  Hi, i have... to create folders and subfolders. here the excel sheet looks like... by line and based on that how can i create folder structure same as the excel 

Java Beginners

code for serching files and folders
code for serching files and folders  i want to create a code in java in which i can search any file or folder present on my local machine...://www.roseindia.net/java/beginners/DirectoryListing.shtml http://www.roseindia.net 

Java-Tutorials

Java Create Directory Example
Java Create Directory Example To create a directory in java call the mkdir... of creating a directory in java is given below SampleInterfaceImp.java import...(System.in)); String directoryName=br.readLine(); // Create one directory 

Java Beginners

code and specification u asked - Java Beginners
can build in java are extensive and have plenty of capability built in. We... for any kind of image and text handling, whether local or on the web. It can asset in any application that can impress the heck out of people. Just as you?d 

Java Beginners

why to create directory structure as web-inf & classes & lib - Java Beginners
why to create directory structure as web-inf & classes & lib    we all know that to prepare webapplications we will create a direcotry sturcture... e)providing deployment descriptor (web.xml) as part of WEB-INF directory 

Java Beginners

why to create directory structure as web-inf & classes & lib - Java Beginners
why to create directory structure as web-inf & classes & lib    we all know that to prepare webapplications we will create a direcotry sturcture... e)providing deployment descriptor (web.xml) as part of WEB-INF directory 

Java Beginners

How to Create any type of Reports in Java - Java Beginners
How to Create any type of Reports in Java  Hello Sir ,How I can create any type of Reports like Crystal Reports etc(Student Result Report) in Java Application,plz Help Me Sir 

Java Beginners

how can create a jar file - Java Beginners
how can create a jar file  plz any one help me which file can i... that you want the resulting JAR file to have. You can use any filename for a JAR... can contain the wildcard * symbol. If any of the "input-files" are directories 

Core Java

Java Create Directory
The following example will show how to Create Directory in Java. Though this can be created by using mkdir() also, the following program has used file object... is already created" will be displayed. Example of Java Create Directory 

Java-Tutorials

Java Create Directory - Java Tutorial
Java Create Directory - Java Tutorial   ...;java CreateDirectory Directory: test created Directories...;. the mkdir( ) method is used to create a single directory while the mkdirs( ) method 

Java Tips and Examples

Java Create Directory - Java Tutorial
Java Create Directory - Java Tutorial       In the section of Java Tutorial you will learn how to create directory using java program. This program also explains 

Java Tools

FTP Server : Create Directory
In this section you will learn how to create directory on FTP server using java 

Java Beginners

create dictionary in java
create dictionary in java  Hi, dear : How can create simple dictionary in java .. by using Applet or any other way like GUI (basic), please write Comment on the line that difficult to learning it .think u so much 

Java Beginners

Can u Look to the error plz - Java Beginners
Can u Look to the error plz  this is my code can u modify it plz and give me the result of it when u check it on eclipse or jcreator plz and i will be more thankfull if u do that :) , oh yeh one thing can you draw a flag 

Java Beginners

can u plz try this program - Java Beginners
can u plz try this program  Write a small record management application for a school. Tasks will be Add Record, Edit Record, Delete Record, List.... --------------------- <%@ page language="java 

Java Beginners

how can i create a data grid - Java Beginners
how can i create a data grid  Nice to ur respose...thnks all of u plz help me i want make a datagrid but i have no idea about this how can i create datagrid. and how can i connect to the database plz help me give 

Java Beginners

How to create a new text file that contains the file names of the copied files in a new directory? - Java Beginners
How to create a new text file that contains the file names of the copied files in a new directory?  Okay so my question is: How to create a new text file that contains the file names of the copied files in a new directory 

Java Beginners

Create a Table - Java Beginners
Create a Table in Java  How can i create table in Java?  Java Example Code - Creating table in JAVA- - - - - - - - - - - - - - - - - - - - - - Hi, here i am giving you a java program code, that creates a table with two 

PHP Questions

Create Directory in PHP
Create Directory in PHP  Hi, I want to create a small php program like how to create directory in PHP. I need the help of PHP programmer, who could... here with suggest the best examples and syntax related how to create directory 

Java Technology Tutorials

Java file new directory
Java file new directory In this section, you will learn how to create a new..."); file.mkdir(); } } By using the method mkdir(), you can create a directory... an object of File class and specify a directory which you want to create. Then we 

Java Beginners

create
create  how to create an excel file using java 

Java Beginners

Create test engine - Java Beginners
Create test engine  How can create a test engine dat generates questions randomly using javax.swing in java 

Java Beginners

Create text file at client's directory from server.
Create text file at client's directory from server.  Need java code to create text file at client's directory from server..... Please Help 

Java Beginners

Any one can help me? - Java Beginners
Any one can help me?  CAN any of u help me to do this java codes for the interface given below? thanku the user will be given jumbled words.... If the player is able to arrange all the words without any mistake, he/she can get 

Java Beginners

Directory chooser in core java - Java Beginners
Directory chooser in core java  Hi, I have to create a Utility which will copy files from a source folder to the any other folder. For same I want to create a GUI( AWT or Swing based only) which should have 2 directory 

Java Beginners

how can create clock baisc in java
how can create clock baisc in java   think u for help me ..   import java.awt.*; import java.util.*; import javax.swing.*; import java.awt.event.*; import javax.swing.event.*; public class DisplayClock extends JFrame 

Java Beginners

how can create clock baisc in java
how can create clock baisc in java   think u for help me ..   import java.awt.*; import java.util.*; import javax.swing.*; import java.awt.event.*; import javax.swing.event.*; public class DisplayClock extends JFrame 

Java Beginners

how can create clock baisc in java
how can create clock baisc in java   think u for help me ..   import java.awt.*; import java.util.*; import javax.swing.*; import java.awt.event.*; import javax.swing.event.*; public class DisplayClock extends JFrame 

Java Beginners

Create Reports in Java with access database - Java Beginners
Create Reports in Java with access database  Hello Sir How to Create Reports of Any Type using Java when i submit data is stored in the MS access... File or any type of Report and then i want to print it. How I can Generate 

Java Beginners

Thank U - Java Beginners
Thank U  Thank U very Much Sir,Its Very Very Useful for Me. From SUSHANT 

Java Beginners

hi , i cant make this programmer , can any one help me to make it pls - Java Beginners
hi , i cant make this programmer , can any one help me to make it pls   In this exercise we would like to build a system in java ( set of classes... directory? TO implement the idea : 1- create the class HandleFile that contains 

Java Magazine Questions

Question in Create Arraylist ?
Question in Create Arraylist ?  Good Morning EveryOne I have Q in Java - and if any One have the Answers please tall me ??!! Question is : 1- Create a class called √Ę??PhoneEntry√Ę?? which can be used to store the name 

Java Beginners

Create JAR file - Java Beginners
Create JAR file  Respected Sir, I got the answer from your side. But do let me know, isn't there any other way of making a JAR File. Simply like... each time in order to run your JAVA program on some other computer, it;s better 

Java Beginners

Create Project SplashScreen - Java Beginners
Create Project SplashScreen   I want to Create project splashscreen that visible only for 1 minute after 1 minute i want to display LogIn form how i can create in java.   Hi Friend, Try the following code: 1 

Java-Tutorials

Moving file or directory from one directory to another
name and if you enter "y", it will create a new directory and copy all the files and folders contained in the source directory... directory does not exist. \nDo you want to create a new directory(Y/N)? " 

Java Beginners

create named class - Java Beginners
create named class  Can you check my coding@program: How to create a class named Employee with name and salary. Make a class Manager inherit from...(); System.out.println(dir.toString()); } } Can you comment and give 

Java Beginners

Create a Swamp Game in Java
the ogre moves, he can move to ANY(Diagonally as well) of the neighbouring squares...Create a Swamp Game in Java  You are to create a game called ‚??Get... given at the end of the coursework. The swamp can be thought of as a four by four 

JSP Tutorials

How to Create New Excel Sheet Using JSP
a new  excel sheet using java .You can create any number of  new excel sheets in a excel file.  To create a excel sheet we can use third party APIs... the name of the sheet as an  string argument. We can create any number of sheets 

Java Beginners

create MS Word in Java - Java Beginners
create MS Word in Java  Hi, Could any one please post the code which creates the word document having different paragraphs and two tables. i have... which creates MS Word in Java 

JSP Tutorials

How to Create Excel Page Using JSP
using java .By going through the steps of  this example we can create any... using pure word files using Java. We can create, read or write MS Excel file using... how to create excel page using jsp    

General

How to Create Create Matrix of any order
Create Matrix of any order Java Program A matrix is a rectangular array of numbers.The numbers in the matrix are called its entries or its elements. A matrix with m rows and n columns is called an m-by-n matrix or m ◊ n matrix, while m 

Programming Tutorials

Open Source Directory
Open Source Directory Open Source Java Directory The Open Source Java... of virtually any directory system.    Red Hat challenges Novell... - to many different platforms.    Open Source Java Directory 

Java Beginners

Create HTML page using java
Create HTML page using java   Hi, I need to create an html page to export some information. Currently, by using java, i've exported information to excel. But now, I would like to view it in HTML instead of excel. Is there any 

Java Beginners

how we can create website through java
how we can create website through java  Dear actually i wanna ask query about creation of website through java then how we can create web site through java plz help me..........i have already a web site ....specially for premium 

Java Beginners

how to create .exe file of java application?? - Java Beginners
how to create .exe file of java application??  hi i want to know how to create exe file of whole application so that i can use that application on any other computer.. i will be very thankful to you..  Hi 

Java-Tutorials

The JDK Directory Structure
Directory structure of JDK Welcome to Java tutorial series. In this lesson, you will learn about the directory structure of Java Development Kit, JDK. Since... structure. On your screen, you can see the directory structure of JDK as well as JRE 

Java Beginners

how can create album in java by using Stack ....
how can create album in java by using Stack ....  hi all , if i press push button put the image to the stack , and when i press pop button remove the image ..??? please help me please 

Java Beginners

Java create new array of strings.
Java create new array of strings.  Java create new array of strings...); } } } Description: Array is container which holds fix length of any kind of data type...] name is an String type array can hold 7 values. You can also 

Java Magazine Questions

How to Create Keyboard in JAVA
How to Create Keyboard in JAVA  please help me to create On-Screen Keyboard with java and please give me an another idia to make it ..............iam waiting for your help ,think u so much 

Java Beginners

CREATE AND WRITE FILE THREAD JAVA
CREATE AND WRITE FILE THREAD JAVA  Hi guys I was wondering how can I make this program in java with threads. I need to create a file and write... a beginner :(   It has to listen from any port **port=6001 (example) Filesize 

JSP Tutorials

Create and Save Excel File in JSP
. Java program allows to you to create any number of excel sheets in an excel file.  To create an excel sheet we can use third party API which is Apache... of the sheet as an  string argument. We can create any number of sheets 

Java Beginners

Create Bar graph
form. Can u help me plzzzzzzz i require a very simple code in java swings were i can edit the code and put my values... i have seen some codes which...Create Bar graph  hi............. In my project i want to create 

Java Beginners

can we mark the class with abstract..with out having any mothed in tit as abstract!!! - Java Beginners
can we mark the class with abstract..with out having any mothed in tit as abstract!!!  hi, can we wite an calls without any abstract methods in it  Hi Friend, No, you can't create abstract class without abstract 

Java Beginners

How to create a class in java
How to create a class in java  I am a beginner in programming and tried to learn how to do programming in Java. Friends please explain how can I create a class in Java 

Java Beginners

How to create charts in Java?
How to create charts in Java?  Is there any example of creating charts and graphs in Java? thanks   Hi, check the tutorial: Chart & Graphs Tutorials in Java Thanks 

JavaScript Questions

to create a java class and methods
to create a java class and methods  How to create a java class without using the library class to represent linked lists of integers and also provide it with methods that can be used to reverse a list & append two lists.Also 

Java Beginners

how to create executable - Java Beginners
how to create executable  How do i create a executable file from a java file thnks in adv...!  Hi Friend, Try the following code: import java.io.*; import java.util.jar.*; public class CreateExe { public 

Java Tips and Examples

Java Directory - Directory and File Listing Example in Java
Java Directory - Directory and File Listing Example in Java... and folders present in the directory. Code of the Program : ...; This example illustrates how to list files and folders present in the specified 

Java Beginners

how to copy the directory in to ftp server using java
how to copy the directory in to ftp server using java  how to copy the directory in to ftp server using java ?   Hello venaktehs As much as I know,You can do this as follows: First,Create a directory in the current 

Java Beginners

we can create our own header file in java?n how to create?
we can create our own header file in java?n how to create?  we can create our own header file in java?n how to create 

JSP Servlet Questions

How to create Discussion Forum? - JSP-Servlet
How to create Discussion Forum?  Hi, Can u tell me what do you... (3.) Java (4.) Struts (5.) JSF (6.) EJB (7.) any other Technologies.... --------------------------------------- Visit for more information. http://www.roseindia.net/java 

Java-Tutorials

How To Create a New File
a new file in Java. A Computer File is a storage of data. In this file we can store String, characters, numbers etc. In Java to create a File for storing... can see the Java docs or click here. Example Here I am giving a simple example 

PHP Tutorial

Create a directory in php
in the form to create a directory. In PHP, you can create a directory using mkdir...Creating a directory in php In  this example, you will learn to create a form in HTML and call php action function of creating directory in HTML form 

Java-Tutorials

Traversing a file and directory under a directory
and subdirectories are traversed lying under a directory. We can find that, how many... describes how you can traverse a directory if it contains directory and files... then make an object of File class and pass any directory and filename to its 

Programming Tutorials

Java Telephone directory management system
Java Telephone directory management system Here we are going to create a java application for Telephone directory system. For this, we have accepted ID, name...: import java.io.*; import java.util.*; class Directory implements 

JSP Tutorials

How to Create JSP Page
How to Create JSP Page       In this section we will show you how you can create JSP page and then test... can be used. In this example I will show you how to create a simple JSP page 

Java-Tutorials

Create a ToolBar in Java
Create a ToolBar in Java       In this section, you will learn how to create toolbar in java.... Toolbar is a area which is situated inside the main window of any applications 

Java Beginners

Using poi hwpf,how to create table in word document. - Java Beginners
Using poi hwpf,how to create table in word document.  Can you please tell me how to create a table in the word document in java using Apache poi hwpf.its very urgent.Please send some sample code.Thanks in advance 

Java Beginners

how to create this diamond structure with java. - Java Beginners
how to create this diamond structure with java.   * *** ***** * *** *** * ***** * *** *** * ***** * *** *** * ***** *** *    

Java Interview Questions

can i restrict a class that it will not allows create more than two objects - Java Interview Questions
can i restrict a class that it will not allows create more than two objects  hi all, can i restrict a class that it will not allows create more than two objects can any help me please. Thaks bala k 

General

Create PowerPoint Slide Using Java
Create PowerPoint Slide Using Java       In this example we are going to create... Escher objects. The following classes can be  used to create the PowerPoint 

Java-Tutorials

Create File in Java
Create a File       ... in string, rows, columns and lines etc. In this section, we will see how to create.... If the mentioned file for the specified directory is already exist 

Swing AWT

How to create a Java Runtime Editor - Swing AWT
How to create a Java Runtime Editor   Hi, I am working on a requirement in which I need to integrate a java runtime editor in swing application. Any suggestions..  Hi Friend, If you want to generate an editor 

Java Beginners

how to hide and unhide folders in java
how to hide and unhide folders in java   i want to hide folder along with its contents and unhide later 

General

Rename the File or Directory in Java
Rename the File or Directory in Java   ... a file or directory is renamed. This program illustrates you the procedure of doing so. Through this program you can easily rename any type of the file 

JSP Servlet Questions

create a button
create a button  i have created button inhtml but my jsp is not working,so can u guide me 

Java Beginners

how to Create a media player - Java Beginners
how to Create a media player  hi great friends my name is David.please i need a source code with detailed explanation on how to create a media player mp3 format.I need this urgently please!my E-mail address 

Java Beginners

Create and Show Wordpad File on JButton Click - Java Beginners
Create and Show Wordpad File on JButton Click  Hello Sir I want to create wordpad or word document on JButton Click Event.which contains data which... directory = fs.getRoot(); directory.createDocument("WordDocument", new 

Programming Tutorials

How to make directory in java
Description: This example demonstrate how to create a directory at specified path. Code: import java.io.File; public ... is that it will make a dir at root directory of C drive 

General

Create Temp File
Create Temp File     ... is created to the default directory.  A temporary file is a file that is created to store information temporarily so that the memory can be freed for other 

Java Beginners

java program to take backup for the folders
java program to take backup for the folders  java program to take backup for the folders   Have a look at the following link: Java Copy one folder to another 

Java Beginners

how to create notepad in java
how to create notepad in java  how to create notepad in java 

Development process Questions

Java sdk/java poi hssf code to creat excel with folder structure,( i,e folders, subfolders and childrens )
Java sdk/java poi hssf code to creat excel with folder structure,( i,e folders, subfolders and childrens )   I need to create a folder structure in the excel file . To be precise, am working on Java sdk of business objecsts 

Java Beginners

Create pie chart
Create pie chart  hi............. In my project i want to create a pie chart to display the result. i require a very simple code in java swings were i can edit the code and put my values... so plz help me 

JSP Tutorials

Create Excel Sheet Using JSP
into excel sheet using java .You can create any number of cells and rows... is used to add the value into the cell. You can add any data types into cell... create excel sheet using jsp    

Java Beginners

Create Array ??
Implementation -Create a class called ‚??PhoneEntry‚?? which can be used to store... directory problem defined above. Part 2. Linked List Implementation Create...?? to solve the phone directory problem defined above. You can also use the same 

Java Beginners

Java basics - Java Beginners
in declaration section you can,t acces any method of other class or else self class. it happens on in a defination section. in declaration u create object of any class...;hello In java no need of main method u rember this thing first. when u 

Hibernate-Tutorials

Hibernate create POJO classes
) to create a classes that implements the entities of the business problem. These can... internally. Type of id can be of any primitive type. Should be prefer(optional) a non...Hibernate create POJO classes In this tutorial you will learn how to create 

JSP Interview Questions

plz help me any one as fast as u can
plz help me any one as fast as u can  A thief Muthhooswamy planned... is the number of metres he can jump (1<=climbUp<=10^10) climbDown... Sample Input 1: 10:1:1:{10} Here Muthooswamy can jump 10 metres height 

Maven 2

Directory Structure of Artifactory-1.2.2
Directory Structure of Artifactory-1.2.2       Here are the folders that are shipped...: Contains all the jar files required to run any application. webapps 

JSP-Tutorials

Create a JRadioButton Component in Java
Create a JRadioButton Component in Java       In this section, you will learn how to create a radio button in java swing. Radio Button is like check box. Differences between check 

Java Beginners

java - Java Beginners
java  Hi, How to create the virtual directory and the corresponding virtual directory how to register the user . and one more question is how... reply, if u explain in brief.. r u working on project? u want it in your 

JSP Servlet Questions

can u plz explain the http request methods - JSP-Servlet
can u plz explain the http request methods  can u plz explain http... we can execute following query: Query CREATE TABLE backup_table AS SELECT... duplicate entries in the MySQL database we can follow one of these following approach 

Java-Tutorials

Create a Frame in Java
Create a Frame in Java       Introduction This program shows you how to create a frame in java AWT package. The frame in java works like the main window where your 

XML Questions

Create XML - XML
Create XML   Hi, Can you please provide java code,that will create xxx.XML file where all the attributes and values of those attributes is predefined from java file? Thanks in advance Sumanta  Hi friend 

Java-Tutorials

Sample Java program for beginners
Here beginners in Java can learn to create there first Hello World program in Java. To install Java one needs JDK (Java Development Kit), which can..., a programmer is ready to create their own Java program. Here we have also described 

Java Interview Questions

create jsp
create jsp  <%@ page language="java" contentType="text/html...; charset=ISO-8859-1"> <title>Create New Student</title> </head> <body> <form name="create" method="post" action="< 

General

Create First Program
to the directory ("C:\vinod" in this example) where your program is saved. Java... createfirstprogram.java) . After compiling successfully, you can run it. Java uses... Create First Program      

Java-Tutorials

Copy Directory or File in Java
Copy Directory in Java      .... otherwise read the source directory name and create the OutputStream instance...: C:\nisha>java CopyDirectory Enter the source directory 

Core Java

Create new file in java
Create new file in java We are going to discuss how to create new file in java. First of all we have create class "CreateFile".and after that we.... With File class we create files and directories. Java File represents actual 

Advertisements Advertisements
 

 

 

DMCA.com