PDA

View Full Version : New to Java, looking for some help.


saitovy
08-26-2009, 09:28 PM
I am tring to code a small java application that will open a txt file, read it's contents, create a new text file called output.txt, and make the file delmited as so

filename|content.

ie:

WIlson.txt
There was a boy named wilson

output.txt
wilson.txt|There was a boy named Wilson.

I need do this for all text files located in a single directory. Thanks in advance!

Any tips hints or suggestions would be great!

ckeyrouz
08-26-2009, 09:50 PM
start by reading this:
http://java.sun.com/docs/books/tutorial/essential/io/file.html

it career
08-27-2009, 11:07 AM
I guess this would be pretty easy , find out all files in the directory,
print name of the file
prinf content of the file , that's all.

brad211987
08-27-2009, 12:56 PM
How comfortable are you with setting up a basic program? Do you have anything started yet?

I would look into things like IO listed above by ckeyrouz and also look into accepting command line arguments, and prompting for input from a user etc...

If you post some more specific questions about your program and the code you have so far, we will be able to help you along a little easier as well.