Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

point to a folder (directory in windows)  RSS feed

 
Peter Primrose
Ranch Hand
Posts: 755
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,

I wonder if anyone knows how to get the a folder's directory (String).

I would like the user to indicate where he wamts to save some files (he should point to a specific folder and later all files will be saved there) for this, I need to get the folder's directory (example: C:\\dev\myFiles\zip\)

I don't want to have a copy-paste of the directory but somthing like a FileDialog which is more friendly.

can anyone guide me here,
Peter
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So... use JFileChooser?
[ October 25, 2005: Message edited by: Ernest Friedman-Hill ]
 
Peter Primrose
Ranch Hand
Posts: 755
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
fileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);

thanks
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!