FileOutputStream to Different Directory

B

bwilde

Hello,

I'm trying to get Java to create a file in a new directory (which
already exists). Using FileOutputStream, I've been able to create a
new file, but it always puts it into the same directory (as far as I
can tell, there is only one argument for file name... nothing for
path). Is there some way to specify another path?

Thanks,
Ben
 
J

Jan Peter Stotz

Hello,

I'm trying to get Java to create a file in a new directory (which
already exists). Using FileOutputStream, I've been able to create a
new file, but it always puts it into the same directory (as far as I
can tell, there is only one argument for file name... nothing for
path). Is there some way to specify another path?

Have you tried to include the path into the filename?

Jan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,565
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top