I know how to get the saveas filename, but how do you get the directory to save a file in?

Right now my workaround consists of getting a saveas filename, then cycling throught the string to get rid of the file selected. This leaves the path only.

The problem is that if there is not already a file in the directory, I can't get the saveas filename and therefore can't determine the directory.