I'm trying to write a program that will read in a directory, check the filenames of every file, organize the files into their own directories with the correct filename format.
I have a list of files in the format: <firstName> <lastName> - <studentNumber> - <correctName>(<aNumber> ; ) .java as in: Derrick Cawthon - 900046067 - UndergraduateStudent( 15 ).java
And they need to come out as a folder named CawthonDerrick and the file within UndergraduateStudent.java.
I have a directory pulled from a file chooser and the files in the directory placed in an ArrayList.
How would I go about checking every file for format errors and make the changes? I was planning on populating a new ArrayList with the files in their correct format. From there I would create a directory with the persons LastName/FirstName and drop the appropriate files into the new directory. I just don't know how to go about implementing this.
Would the Formatter class help any?
[ November 15, 2005: Message edited by: Greg Roberts ] [ November 15, 2005: Message edited by: Greg Roberts ]
Greg Roberts<br />CIS Student<br />University of West Florida
incandescent light gives off an efficient form of heat. You must be THIS smart to ride this ride. Tiny ad: