Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.

call explorer

How can I open a folder in windows explorer for the user to see.


  • edited October 17
    i worked this out:
    SRP_Run_Command("explorer ":MainPath,"DOS")

    but the dos window flashes up.
    Is there a neater way. (or another parameter/option)
  • You want to use ShellExplorer (which is a direct WinAPI call). I think it's already defined in OI. Here's some code the opens the users folder:

    Compile Function Test(VOID) Declare function Get_Property Declare subroutine ShellExecute hWnd = Get_Property(@Window, "HANDLE") Operation = "explore":\00\ File = "C:\Users\":\00\ Parameters = \00\ Directory = \00\ ShowCmd = 1 ShellExecute(hWnd, Operation, File, Parameters, Directory, ShowCmd) Return 1
  • I assume you don't need to use this as a file/folder picker? If not, go with Kevin's solution.
  • Yep, that was exactly as needed.
    Thank you
Sign In or Register to comment.