Thanks all those that replied. I implemented Eric Frost's solution which worked a charm. Thanks to everyone that replied and Eric if you are every down this way I owe you a beer. Cheers Martin ================================== Martin Roundill GIS Manager Waitakere City Council Private Bag 93109 Henderson Waitakere City New Zealand >>>>>>>>>>>>>> Solution from Eric Frost / HR and Associates, Inc. [EMAIL PROTECTED] Include "MapBasic.def" Type BROWSEINFO hwndOwner as Integer pidlRoot As Integer pszDisplayName As String lpszTitle As String ulFlags As Integer lpfn As Integer lParam As Integer iImage As Integer End Type Declare Function SHBrowseForFolder Lib "shell32.dll" (bi As BROWSEINFO) As Integer Declare Function SHGetPathFromIDList Lib "shell32.dll" (ByVal pidl As Integer, szPath As String) As Integer Dim r As Integer, bi As BROWSEINFO, s As String s = Space$(260) bi.hwndOwner = SystemInfo(SYS_INFO_MAPINFOWND) bi.pidlRoot = 0 bi.pszDisplayName = s bi.lpszTitle = "Default Data Folder" bi.ulFlags = 1 bi.lpfn = 0 bi.lParam = 0 bi.iImage = 0 r = SHBrowseForFolder(bi) If r <> 0 Then r = SHGetPathFromIDList(r, s) End If Print s >>>>>>>>>>>>>> Peter Doyle [EMAIL PROTECTED] >>>>>>>>>>>>>>>>>>>> >>>>> A similar response was received from Mike Taylor [EMAIL PROTECTED] >>>>>>>>>>>> >>>>> The idea being to pre-set a file name, Mike suggested "Choose directory and press save" for the file name >>>>> >>>>> A good solution but Eric's solution is cleaner >>>>>>>>>>>> Include "Mapbasic.def" Declare Sub Main Dim DirectoryName As String Sub Main DirectoryName = PathToDirectory$(FileSaveAsDlg("" ,"temp" ,"" , "Select Directory")) If DirectoryName = "" Then Note "User pressed Cancel" Exit Sub End If Note DirectoryName End Sub >>>>>>>>>>>>>>>>>>>>> Christian Singer [[EMAIL PROTECTED]] replied >>>>>>>>>>>>>>>>>>>>>> A way to implement a folder selection dialog is to modify the standard Windows 'GetOpenFileName()' dialog by use of a so-called 'hook' function for this dialog, intercepting WM_INITDIALOG and WM_NOTIFY messages. This also makes the creation of new folders feasible. Alternatively, you could 'borrow' the directory tree view from the left frame of the Windows Explorer via OLE2 and the Windows Shell API, using 'SHBrowseForFolder()'. In any case, as far as I know, you won't be able to do this with MB alone, but rather require a more powerful development tool (like a C++ compiler ...) to build a small supplementary DLL module. >>>>>>>>>>>>>>>>>>>> Cautley, David/PDX [[EMAIL PROTECTED]] was quick of the mark with the following reply >>>>>>>>>>>>>>>>>> In a word, No. Same problem exists in plain old Visual Basic -- because the standard Microsoft dialog boxes don't understand that sometimes you just want to select a folder, not specify a file name. Sometimes the FileSaveAs dialog is a little closer to what you want than FileOpen. Don't remember off the top of my head what MapBasic provides in the Save or SaveAs category. ---------------------------------------------------------------------- To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put "unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]