c# - 使用 explorer.exe 打开特定文件夹
问题描述
我正在尝试使用 explorer.exe 打开一个特定的文件夹,如果该文件夹不存在,预计会出现错误,但它只是打开一个默认文件夹。
这是我的代码:
ProcessStartInfo startArgs = new ProcessStartInfo() { FileName = "explorer.exe", Arguments = Path.Combine(deskPath, "Room 1", "9am") };
try
{
Process.Start(startArgs);
}
catch(exception ex) label1.Text = ex.Message; }
解决方案
推荐阅读
- r - shinydashboard:按下按钮后 x 秒执行数据导入
- java - 将加密的数据从客户端发送到服务器端进行解密
- node.js - AWS Lambda:如何按顺序调用 Mysql Query
- angular - 错误:'Spec 'ChromeLauncher works' 没有任何期望。'
- php - 如何使用 htaccess 检查非索引目录
- swift - URL 构造函数不适用于某些字符
- android - 为什么我会收到“不是有效的密钥库文件”错误
- css - 通过了解他们在 R 中的 CSS 类来抓取嵌入式交互式地图的细节
- java - 将 Loadtime weaver 与第三方 jar 类方法拦截器一起使用
- powershell - AzureRM Add-AzureRmADGroupMember 失败