Writing a new file in non-existent directory

I've written a program that will read files from one area and write them to another. It works great when the directory structure is already in place, but when I try to write the file in a directory that doesn't exist then problems occur. I was just wondering if there was some way of making it create the directory for me or do I have to parse the string and create the directories by hand? Thanks,

Dave Johansen

[434 byte] By [daveisfera] at [2007-9-27 15:37:34]
# 1
Look up File.exists() and File.mkdir() in the API doc.
eriklindquist at 2007-7-5 23:39:36 > top of Java-index,Archived Forums,Java Programming...
# 2
There's also a File.mkdirs() that will create any non-existent parent directories.
eriklindquist at 2007-7-5 23:39:36 > top of Java-index,Archived Forums,Java Programming...