0

I'm looking for function that Open window explorer in C language. I have found this [answer](How can I open Windows Explorer to a certain directory from within a WPF app?), but this is C# language. C can't have these features? I use VS 2010.

I'm a beginner of C. So my question may seem ridiculously easy. But if you give me the answer I really appreciate it. Thanks :)

Community
  • 1
  • 1
Soyeon Kim
  • 598
  • 6
  • 33

3 Answers3

2

Try using SHOpenFolderAndSelectItems() function, which can open files in windows explorer.

https://msdn.microsoft.com/en-us/library/windows/desktop/bb762232(v=vs.85).aspx

Karthikeyan
  • 371
  • 8
  • 19
2

The simplest way to open a certain directory in an explorer (here c:\program files) may be:

system("start \"\" \"c:\\program files\"");
Joël Hecht
  • 1,534
  • 1
  • 15
  • 16
1

Given the stslib.h library contains the system() function that let's you run shell commands, you should be able to run the command to open a new windows explorer window using the same command you would use in the terminal window.

A guideline: http://www.programmingsimplified.com/c-program-shutdown-computer