Opening a directory

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • MrPickle
    New Member
    • Jul 2008
    • 100

    Opening a directory

    Is there a way to force windows to open up a directory with explorer.exe through c++?

    I think system("explore r.exe"); but then how do I choose which directory?
  • boxfish
    Recognized Expert Contributor
    • Mar 2008
    • 469

    #2
    Pass the path of the directory in quotes to the explorer command.
    system("explore r \"C:\\mydir\ "")
    Hope this helps.

    Comment

    • gpraghuram
      Recognized Expert Top Contributor
      • Mar 2007
      • 1275

      #3
      You can us ethis command to do that
      iexplore "c:\program files"

      You can pass this command to system() and it will open the directory.


      raghu

      Comment

      Working...