dialog to set destination folder when loading multiple files

Hello, all.

I've written a function that opens N text files and stores the contents thereof in N new waves. After the user has selected the N text files, but before the Make functions have been called to create the new waves that will store the data from those text files, I would like to give the user the opportunity to select an existing data folder in which to save the newly created waves, or create a new folder in which to save the new waves. Basically, something like the "save file" dialog of any software on any OS, but with the file tree of the currently open Igor experiment rather than the computer's file tree.

As there will ultimately be tens - sometimes hundreds of waves holding data from many samples/measurement procedures/etc. in each Igor experiment, it will be necessary to parcel those waves out into data folders; deciding which folder in the experiment to put the waves in at the time that the data are loaded seems like the most natural workflow, but I've yet to figure out how to accomplish it.

Any advise would be appreciated.

Cheers.

Ian

Maybe
createbrowser prompt="Select Data Folder" ,expandall, showwaves=0, showvars=0, showstrs=0

comes close. The selected datafolder is stored in "S_BrowserList" after clicking "OK"
HJ
Thank you, kanekaka and HJDrescher.

Thanks to your assistance, I have more or less the behaviour I was hoping for.

If anyone is interested, I would be happy to share the resulting code snippet; however, with error handling and the extra code necessary to access the global variables created by CreateBrowser, it took more than 100 lines of code to get what I wanted, so I will not post the final code here.

Thanks again.