文件目录Windows [英] File Directories Windows

查看:82
本文介绍了文件目录Windows的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我有以下情况:

我有一个目录名称:Management Server

我需要通过代码找出此目录在程序文件还是程序文件(x86)或计算机上其他驱动器上的位置

有办法吗?

在此先感谢!

Hi Guys,

I have the following scenario:

I have a directory name : Management Server

I need to find out through code where this directory is whether it is in Program Files or Program Files (x86) or on another drive on the computer

Is there a way to do this?

Thanks in advance!

推荐答案



你为什么不使用
string [] l_dir = Directory.GetDirectories API来搜索reqd目录.
Hi,

why dont you use
string[] l_dir = Directory.GetDirectories API to search out the reqd directory.


您知道创建该目录的程序吗?如果没有,您可以遵循nitin-aem描述的解决方案",这可能需要很长时间才能执行...
但是,如果您知道的话,请找出
(1)已安装该程序(否则该文件夹将不存在)
(2)该程序如何存储其设置(一些ini文件,xml文件,注册表项等)并从其设置中读取它
使用该程序的较新版本,情况可能会发生变化...
Do you know the program which created that directory? If not, you could follow the "Solution" described by nitin-aem which might take a very long time to execute...
But if you know it, find out
(1) that that program is installed (otherwise that folder won''t exist)
(2) how that program stores its settings (some ini files, xml files, registry keys etc...) and read it from their settings
With a newer version of that program, things may change...


这篇关于文件目录Windows的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆