title: select any folder as startfolder for browsing (win32gui,win32com, SHGetFolderLocation)
body: <p>I want to start with a folder e.g. C:\test<br />
  <strong>instead of</strong> any of the <strong>predefined CSIDL_</strong>* folders.
  How can I achieve that?</p>
  <pre><code>    ''' python 3.6.2 '''
  
      import os
      import win32gui
      from win32com.shell import shell, shellcon
  
      myfolder_pidl = shell.SHGetFolderLocation (0, shellcon.CSIDL_DESKTOP, 0, 0)
  
      pidl, display_name, image_list = shell.SHBrowseForFolder (
        win32gui.GetDesktopWindow (),
        myfolder_pidl,
        &quot;Select a file or folder&quot;,
        0x00014050, #shellcon.BIF_BROWSEINCLUDEFILES and some more
        None,
        None
      )
  
      if (pidl, display_name, image_list) == (None, None, None):
          print ('Nothing selected')
      else:
          my_path = shell.SHGetPathFromIDList (pidl)
  
      file_to_process = my_path.decode()
  
      ''' continue processing file_to_process
      '''
  </code></pre>