avani mittal
create folder
2 Answer(s)      3 months and 27 days ago
Posted in : Java Beginners

what code we should write as a web application that it create an empty folder on client's desktop?

View Answers

January 28, 2013 at 1:37 PM


hi friend,

To create a new file you may use the mkdir() method of java.io.File class.

And to create the folder at user's desktop you may use the following code :

String homeDirectory = System.getProperty("user.home");     
String desktopPath = homeDirectory+"\\desktop"; 

File folder = new File(desktopPath+"\\NewFolder");
boolean bol = folder.mkdir();
    if(!bol)
    {
        System.out.println(folder.getParent()+" : There is a problem in creating New Folder");
    }
    else
        System.out.println("Folder created at "+folder.getParent()+" successfully");

for detail tutorial you can go through this link Java Create Directory


January 29, 2013 at 10:58 AM


thanks for responding but i want to know what code to run on server desktop which will be able to create folder on client desktop along with some qurys running on server database.









Related Pages:
create folder
create folder  what code we should write as a web application that it create an empty folder on client's desktop
create a folder in jsp page
create a folder in jsp page  i want to create a folder in jsp page And it can be delete aslo
Java lock file or folder.
Java lock file or folder.  Is it possible to create a desktop application to lock or encrypt file or folder in windows by using java code?? if possible can provide some reference?? because i can't find it... thanks
create folder chooser - Java Server Faces Questions
create folder chooser  I don't know how to create a browser folder( to save file download, for instance, not file chooser), please help me,(use swing), thanks   Hi Friend, Try the following codes: 1) import
how to set folder size in php
how to set folder size in php  hi , i know how to create folder but i dont know how to set size for folder did u know means tell me. thankyour
Full path of image to save it in a folder
&trying to create a project.   Hi, If you wish to upload files in the local context of your project, then you may first create a folder under WEB... are a beginner, I would suggest that you create a servlet and call it from the page using
Java get Folder Size
in the specified folder. We have create a method getFileSize() in order to obtain... Java get Folder Size     ... of specified folder.  In the given example, we are going to show you the size
Java- Save Image into project folder in web application
want to save the image..when I am trying to create empty folder and get...Java- Save Image into project folder in web application  I have a requirement of saving the image into project folder .. which is a web application
Zip Folder Using Java
; In this example we are going to create a zip folder and all files contained... and sub folders of a folder just to take less space. To do so we create two... first to create "out"  folder and put the files to be zipped
Delete image from folder - JSP-Servlet
two image will be create that pie chart showing employee work performance. that image name based on user id and that image is going to on folder in server after
Folder in Java.
Folder in Java.  I have any problem how to make Folder in java program? Can Anybody help me in this part
Creat a folder, inside it upload and download files in jsp and mysql
Creat a folder, inside it upload and download files in jsp and mysql  Create one or more folder .inside it we can upload and download multiple files   Here is an application that will upload the file and save
copy file from folder to folder - Java Beginners
copy file from folder to folder   my requirement is I need to copy xml files from one folder to another my source file contains the field filename.... Suppose in the source file, file name is goodfile1.xml source folder
"The folder name is not valid" netbeans
"The folder name is not valid" netbeans  "The folder name is not valid" while crating a jsp,html or any page in netbeans
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... to create a folder structure in the excel file . To be precise, am working
struts2 folder struture - Struts
struts2 folder struture  Hi, I just want to know the exact folder structure required for the struts2 application? Its urgent
Zipping folder - Java Beginners
to zip a user selected folder . this folder may contain any number of folder and sub folders. i saw an example in this site showing , how to zip a folder, i executed... solve this.. zipping folder and all of its files and sub folders. thanking
Last modified date of a folder
Last modified date of a folder  How to get the last modified date of a folder specified by a link in html
URL folder download to local
URL folder download to local  I have a requirement to download all the folders and files inside from a SVN link to my local directory. Can you help how it could be done
image save to folder in java
image save to folder in java  Hi, I am working with java. In my application i want to give facility to user to add and change image. I use open... folder and that path stored into database, for furhter retrivation. Please guide me
Zipping folder - Java Beginners
to zip a user selected folder . this folder may contain any number of folder and sub folders. i saw an example in this site showing , how to zip a folder, i executed... solve this.. zipping folder and all of its files and sub folders. thanking
Create Database SQLite
Create Database SQLite  Hi, I am unable to create database in sqlite... Database... name the database and save it into any folder. i generally, save it on Desktop and i add the table into my project. Create Table into MSQLite Database
xcode group folder
in Xcode Project Folder. Neelam   Follow the steps.. View -> Smart Groups -> All Files it'll group all the files in Xcode Project Folder. Neelam
How to make a folder icon, make a folder icon, folder icon
How to make a folder icon       The folder is used in the computer, this example will teach you to design technique of the folder.  New File: Take a new file as your folder
Jfree create error
Jfree create error  hi.............. thanks 4 ur help. as u said i have downloaded both the jar files and placed in jdk1.5 lib folder. but then also its giving the same error can u tel me why this is happening? and also u
Jfree create error
Jfree create error  hi.............. thanks 4 ur help. as u said i have downloaded both the jar files and placed in jdk1.5 lib folder. but then also its giving the same error can u tel me why this is happening? and also u
java program to copy the contents of one folder to another folder
java program to copy the contents of one folder to another folder  java program to copy the contents of one folder to another folder   Have a look at the following link: Java Copy one folder to another
how to download a file from a folder??
how to download a file from a folder??  i can upload any kind of files to a folder, and only the path of the file is saved into the database, now how a client can download the file from my folder. pls provide me the jsp code
How to create a jar file
How to create a jar file  Hello!!!! I have a project which has a multiple classes with database connection(MS-Access) & now i want to make...(); File folder = new File("C://Answers//Examples"); File[] files
search for particular keyword in the folder documents
search for particular keyword in the folder documents  i am having... to particular folder. it is a stand alone application so i have to search particular keyword in the folder having document like in pdf , word or excel
create
create  how to create an excel file using java
how to browse folder and directory in jsp
how to browse folder and directory in jsp  how to browse folder and directory in my jsp page.i have done my coding part for browsing directory but dont know how to get files after that.and also i want to show limited directories
List Information about folder
List Information about folder       This Example shows you how to show folder information. In this code we have used method of Folder class to retrieve information about
Compressing a folder into GZIP format using PHP Windows
Compressing a folder into GZIP format using PHP Windows  How to gzip compress a folder/directory in PHP using windows
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...(String[]args){ CreateExe ex=new CreateJar(); File folder = new File("C
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... Prompt. 2. Navigate to the folder that holds your class files: C:\>cd
How to copy an jpeg image from one folder to other folder using jsp
How to copy an jpeg image from one folder to other folder using jsp  How to copy an image from one folder to another folder using jsp
PHP listing files in folder
All files, folder   of the given folder can be listed. Function readdir() takes input as the folder handle. Then readdir() returns the name of all the files and folders. Example of PHP Listing Files in Folder
Protect to folder in webapps Tomcat - JSP-Servlet
Protect to folder in webapps Tomcat  Thanks for previous answer. my question is- I want to know how to protect the folder inside the webapps in tomcat. i want to give only war/jar file to client .how to do
Monitor the Folder for the new incoming files - Development process
Monitor the Folder for the new incoming files  to monitor the whole folder for new incoming files ,which the client will place...Monitor the Folder for the new incoming files   Hi,The simplest way to achieve
create folders and sub folders based on excel data
by line and based on that how can i create folder structure same as the excel...create folders and sub folders based on excel data  Hi, i have... to create folders and subfolders. here the excel sheet looks like
How I Choose a folder - Java Interview Questions
do not explain clearly my question. I know how I get files from a folder. My question How I select a folder. From this selected folder i get the files. I know how I get files but the problem How I choose a folder. Thanks
How to copy an jpeg image from one folder to other folder using jsp
How to copy an jpeg image from one folder to other folder using jsp  ... be in my image folder...so,How to copy an jpeg image from one folder to other folder using jsp or servlet
i want to save image on server folder. and i want to save URL of this folder and name of image in database
i want to save image on server folder. and i want to save URL of this folder and name of image in database  hi i want to save image on server folder. and i want to save URL of this folder and name of image in database.on click
Executing code upon folder/drive access
Executing code upon folder/drive access  I would be glad if someone could show me how to make your program in jar format execute when the folder that contains it is accessed or maybe a drive. Thank you.   Hi In case
Delete image from folder - JSP-Servlet
Delete image from folder  Hi Thanks Rajnikant to given me reply i am not storing my image in db just userid comming from db means my image name like : Pie(userid).png which alocated in my server folder when
How to upload and save a file in a folder - Java Beginners
How to upload and save a file in a folder  Hi How to upload and save a file in a folder? for example Agreement.jsp File: So when user browses the file and enters the submit button the respective file should
How to create a jar file with database connection
How to create a jar file with database connection  Hello Everyone... access & i want to create a jar file of it... I have tried with manifest...[]args){ CreateJar jar=new CreateJar(); File folder = new File("C://Answers

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.