Is there a way to control windows explorer (file browser), programmatically from C#?
2 Answers
Check the shell libraries in the Windows API Code Pack. The code also comes with lots of examples.
About XP: I've never tried those libraries on XP (and I cannot right now), but I assumed that not everything is Win7/Vista specific. Maybe the shell libraries are not. Have you tried to compile one of the examples?
There is a file dialog for users to select a file, if that's what you mean. Have a look at the OpenFileDialog class.
-
No I need a to automate the windows file explorer with operation like open, select file, copy file...– GuyCommented Jan 25, 2010 at 6:17
-
1Are you sure you need to automate explorer itself? What are you trying to accomplish? Would the classes in the System.IO namespace serve your purpose, like the File class? It has Open() and Copy() methods. Commented Jan 25, 2010 at 6:22