Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

File System "Copy"

Status
Not open for further replies.

adiMasher

Programmer
Aug 31, 2001
144
US
I have blinders on and a brain lock has occurred. For some reason I can't figure out how to do a simple "copy" command.

I'm using the File class and I'm using that to create directory structures but the createfile() command is used to create an empty file of the specified name.

I'm just trying to say copy filea to newdirectory/filea

please help a brain locked programmer.

Martin I don't suffer from insanity.
I enjoy every minute of it.
 
I create buffered readers and writers and literally copy the contents from one to the other. I'm not aware of a native java one-shot method.

Does anyone else know?
 
Ya, I found that out pretty quickly. I looked around and low and behold, someone has posted the answer quite clearly.

thread269-14710

I don't suffer from insanity.
I enjoy every minute of it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top