Results 1 to 6 of 6
Thread: FoldersWork
- 03-29-2009, 05:12 PM #1
Member
- Join Date
- Mar 2009
- Posts
- 7
- Rep Power
- 0
- 03-30-2009, 02:08 AM #2
Moderator
- Join Date
- Feb 2009
- Location
- New Zealand
- Posts
- 4,545
- Rep Power
- 11
Umm. Is this a Java question?
If so, a very good place to get ideas that might be useful in your code would be the File API documentation.
- 03-30-2009, 03:05 PM #3
Member
- Join Date
- Mar 2009
- Posts
- 7
- Rep Power
- 0
yup
thanks for replying and yes it's a Java question
i am working on Java project
in my class but i am a begginer to Java so i might asking the ques. in the wrong way
mainly i want to make a folder (the same as the one of the windows) to save some files in it
is this available in Java ?
and if so how can i do it or what class would help me ?
- 04-28-2009, 03:30 AM #4
Create directory etc
This may be to late but
To make a directory
To move a file and rename itJava Code:File f = new File("C:\\Users\\Admin\\Desktop\\javaprojects\\FolderName"); f.mkdir(); // makes folder/directory
Hope this helps although I suspect you may have the answer by now.Java Code:File a = new File ("C:\\Users\\Admin\\Desktop\\BmiAssignment_Notes\\mbrshipFiles\\FileToCopy.txt"); a.renameTo(new File("C:\\Users\\Admin\\Desktop\\javaprojects\\collegeSamples\\homework\\Assessment3Bmi\\build\\classes\\assessment3bmi\\mbrshipFiles\\FileNewName.txt"));
- 04-30-2009, 11:40 PM #5
Member
- Join Date
- Mar 2009
- Posts
- 7
- Rep Power
- 0
- 04-30-2009, 11:44 PM #6


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks