There is no any component to do what you want in CUBA for the web client. Moreover, JavaScript doesn’t allow to choose a directory due to security restrictions. Only one way is to use SWFUpload. If you need some example, I’ll prepare it.
In case of desktop client you can use the JFileChooser component.