© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
5 replies
Nemesis

❔ Process.Start doesn't open directory

I am looking for a generalized way of opening directories through C# application.
Most of the stackoverflow answers, such as this: https://stackoverflow.com/questions/1746079/how-can-i-open-windows-explorer-to-a-certain-directory-from-within-a-wpf-app/30939461#30939461, say
Process.Start(<directory>)
Process.Start(<directory>)
should work.
But I get exception:
System.ComponentModel.Win32Exception: 'An error occurred trying to start process 'file:///C:/dev/directory' with working directory '<workingdirectory>'. The system cannot find the file specified.'
I am able to open the directory by
Process.Start("explorer", "C:/dev/directory")
Process.Start("explorer", "C:/dev/directory")
. So, why is the other way not working?
Is the answer for an older version of C# or am I doing something wrong?
Stack Overflow
How can I open Windows Explorer to a certain directory from within ...
In a WPF application, when a user clicks on a button I want to open the Windows explorer to a certain directory, how do I do that?

I would expect something like this:

Windows.OpenExplorer("c:\tes...
How can I open Windows Explorer to a certain directory from within ...
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

process start
C#CC# / help
2y ago
[Repost] Process start
C#CC# / help
4y ago
System.IO.DirectoryNotFoundException: {directory}\wwwroot\
C#CC# / help
16mo ago
❔ Process.Start() on Python script on Ubuntu won't start
C#CC# / help
3y ago