C
Cindy Lamma
Hello guys, I'm an old java programmer coming back on the scene, though I
never was a java expert.
I started working on a small project which works like a database. I want to
allow users to select files and then have the DB import them. I have it set
so the user can use JfileChooser to import a specific selected file into the
database.
Now here is the problem, I want the user to also select just a directory if
they want to, and the DB can import all the files in that dir manually.
I found a method which sets JfileChooser to only allow selecting of
directories. But NOW WHAT? I was thinking of making a loop, that scans all
filenames in a directory, then I'll have a method open each one of them in
sequence. But this is what has me baffled, how to do this?
I'm not even sure where to start, even though I can easily grab the
directory NAME the files are in. The last time I did this sort of thing, I
remember having to use Shell Commands.
Thanks in advance.
never was a java expert.
I started working on a small project which works like a database. I want to
allow users to select files and then have the DB import them. I have it set
so the user can use JfileChooser to import a specific selected file into the
database.
Now here is the problem, I want the user to also select just a directory if
they want to, and the DB can import all the files in that dir manually.
I found a method which sets JfileChooser to only allow selecting of
directories. But NOW WHAT? I was thinking of making a loop, that scans all
filenames in a directory, then I'll have a method open each one of them in
sequence. But this is what has me baffled, how to do this?
I'm not even sure where to start, even though I can easily grab the
directory NAME the files are in. The last time I did this sort of thing, I
remember having to use Shell Commands.
Thanks in advance.