I have used the FileOpenDlg() function to allow the user to choose a file. I would like to do the same thing to allow them to choose a folder so I can save files to the folder without the user having to interact every time a file saves. Is there a function for this?
There is no MapBasic command to get a directory path. You can extract the directory from a full file path string and truncating at the last \ etc, but it's messy and not a nice solution.
A much better way is to use a Shell API or .NET function, some examples of which can be found here: https://groups.google.com/forum/#!msg/mapinfo-l/MGFhmQSpmwo/7irVqnPhZosJ