确定所有开放系统/特殊文件夹 [英] Identify all open System/Special Folders
本文介绍了确定所有开放系统/特殊文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我目前使用下面来获取所有打开资源管理器窗口的路径< /一>:
I am currently using the following to Get Path of all Open Explorer Windows:
foreach (SHDocVw.InternetExplorer j in new SHDocVw.ShellWindows()) {
if (j.Name == "Windows Explorer") {
ListView1.Items.Add(j.LocationURL);
}
}
不过,这并不返回如电脑,回收站,网络等特殊文件夹的位置,有没有一种方法来识别这些文件夹,所以我可以把路径上自己喜欢外壳:MyComputerFolder
计算机?
推荐答案
如果 j.LocationName
是空
我与当前系统文件夹的名字进行了比较:获得Windows特殊文件夹的当前名称< /一>,然后添加的路径手动像外壳:MyComputerFolder
If j.LocationName
was null
I compared it with the current system folders' name : Get Current Names of Windows Special Folders, then added the path manually like shell:MyComputerFolder
这篇关于确定所有开放系统/特殊文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文