create folder

Ads
 

create folder

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.

Ads









Related Tutorials/Questions & Answers:
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
Advertisements
ModuleNotFoundError: No module named 'create-folder'
ModuleNotFoundError: No module named 'create-folder'  Hi, My... 'create-folder' How to remove the ModuleNotFoundError: No module named 'create-folder' error? Thanks   Hi, In your python
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
Folder in Java.
Folder in Java.  I have any problem how to make Folder in java program? Can Anybody help me in this part
create
create  how to create an excel file using 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 create main method than we use try and catch block. We have created File object
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
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
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
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
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
linux tar folder and subfolders
linux tar folder and subfolders  Hi, I am new to Linux operating system. I have a directory which contains many files in several directories and sub.... Help me with the command in Linux for archiving folder and subfolders into tar
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
how to backup files and folder with Java
how to backup files and folder with Java  Does anyone know to create...[]) { CreateBackupFile create = new CreateBackupFile(); String fileName = "C:\\Documents and Settings\\bharat\\Desktop\\bipul\\New Folder\\TableExample.java
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
ModuleNotFoundError: No module named 'cubicweb-folder'
ModuleNotFoundError: No module named 'cubicweb-folder'  Hi, My... named 'cubicweb-folder' How to remove the ModuleNotFoundError: No module named 'cubicweb-folder' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'folder-compiler'
ModuleNotFoundError: No module named 'folder-compiler'  Hi, My... named 'folder-compiler' How to remove the ModuleNotFoundError: No module named 'folder-compiler' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'folder-organizer'
ModuleNotFoundError: No module named 'folder-organizer'  Hi, My... named 'folder-organizer' How to remove the ModuleNotFoundError: No module named 'folder-organizer' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'folder-syncer'
ModuleNotFoundError: No module named 'folder-syncer'  Hi, My... 'folder-syncer' How to remove the ModuleNotFoundError: No module named 'folder-syncer' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'folder-syncer'
ModuleNotFoundError: No module named 'folder-syncer'  Hi, My... 'folder-syncer' How to remove the ModuleNotFoundError: No module named 'folder-syncer' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'maxlength-folder'
ModuleNotFoundError: No module named 'maxlength-folder'  Hi, My... named 'maxlength-folder' How to remove the ModuleNotFoundError: No module named 'maxlength-folder' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'sequence-folder'
ModuleNotFoundError: No module named 'sequence-folder'  Hi, My... named 'sequence-folder' How to remove the ModuleNotFoundError: No module named 'sequence-folder' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'shadow-folder'
ModuleNotFoundError: No module named 'shadow-folder'  Hi, My... 'shadow-folder' How to remove the ModuleNotFoundError: No module named 'shadow-folder' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'folder-rotator'
ModuleNotFoundError: No module named 'folder-rotator'  Hi, My... named 'folder-rotator' How to remove the ModuleNotFoundError: No module named 'folder-rotator' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'folder-rotator'
ModuleNotFoundError: No module named 'folder-rotator'  Hi, My... named 'folder-rotator' How to remove the ModuleNotFoundError: No module named 'folder-rotator' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'smart-folder'
ModuleNotFoundError: No module named 'smart-folder'  Hi, My Python... 'smart-folder' How to remove the ModuleNotFoundError: No module named 'smart-folder' error? Thanks   Hi, In your python
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
Virtualbox shared folder permissions error
Virtualbox shared folder permissions error  Hi, I am running Oracle... as of the guest os. I have shared a folder from my windows computer to the Virtual box vim. The mapping for this folder appears inside the VM but I am not able
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

Ads