Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

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

share|improve this answer
    
Just what I needed. Thanks. –  user15642 Jun 13 '13 at 14:01
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.