Proper Data folder and path management

Hello All!

I've been using igor 6.37 for about 2 years now and have been getting slowly better at stuff.
Today I have a question regarding data folders. Whenever I create a procedure, I usually have various stages of the procedure create more waves derived from teh original one. I then have these waves moved into various new data folders, and then when the procedure finishes all of the new waves in their new folders are moved into a parent folder within root. Something like this root:Parentfolder:foldercontainingwaves. In other procedures I want my procedure to look within foldercontainingwaves at those waves and perform actions upon them. My common solution is for the user to have to input the full path as a string (Eg. "root:Parentfolder:foldercontainingwaves") but this can get cumbersome and error inducing if A. the user enters the name wrong and the program exits with an error, or B. The user doesn't know the exact full path.

My question is twofold.
1. is there a way to prompt, with the dropdown menus, the user to just pick a folder without having to enter it in as a string by hand
2. is there a way to re-prompt the user if the TYPED in folder doesn't exist

Thank you in advance
1. Take a look at Example1 in the CreateBrowser help topic. Since you want the user to select a data folder, I would use showWaves=0 in the CreateBrowser command instead of showWaves=1 like in the example.
2. Use DataFolderExists to test if a user-provided data folder exists. If not, then go to step 1 (have the user pick the data folder)
A more involved solution, but one that I find useful, is to use WaveMetrics code for turning a listbox into a "WaveSelectorWidget". I often create a control panel as a GUI and embed a listbox/widget to enable the user to easily specify files to act on.

An example experiment is available from: Files > Example Experiments > Programming > WaveSelectorWidgetExample