【发布时间】:2015-10-24 20:00:43
【问题描述】:
我需要在每台计算机上获取一个具有不同名称的文件的文件夹路径。为此,我需要使用随机生成的名称扫描包含此文件的文件夹,然后将该文件夹的名称存储为字符串,以便我可以添加到路径中。
这是我的代码:
string mypath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
string mypath1 = @"\Roaming\Mozilla\Firefox\Profiles\";
string mypath2 = //here is where i would like to scan the \Roaming\Mozilla\Firefox\Profiles\ and store the folder inside as a string
string all_path = mypath + mypath1 + mypath2;
【问题讨论】:
-
我不太明白你的问题。您不想获取 Firefox\Profiles 下的文件夹名称并存储其绝对路径吗?