How to get Previous Directory such as ../ in DOS SYSTEM

455919946

Client
Регистрация
31.12.2013
Сообщения
104
Благодарностей
4
Баллы
18
How to get Previous Directory such as ../ in DOS SYSTEM?I know
{-Project.Directory-} .but I need other {-Project.XXX-} means Previous Directory such as ../ in DOS SYSTEM
 

darkdiver

Administrator
Команда форума
Регистрация
13.01.2009
Сообщения
2 285
Благодарностей
2 730
Баллы
113
Use following C# snippet (the project variable "path" should contain your directory)

C#:
var workingDirectory = project.Variables["path"].Value;
var di = new System.IO.DirectoryInfo(workingDirectory);
return di.Parent.FullName;
 
  • Спасибо
Реакции: bigcajones

455919946

Client
Регистрация
31.12.2013
Сообщения
104
Благодарностей
4
Баллы
18
Use following C# snippet (the project variable "path" should contain your directory)

C#:
var workingDirectory = project.Variables["path"].Value;
var di = new System.IO.DirectoryInfo(workingDirectory);
return di.Parent.FullName;
I do not understand the project variable "path" should contain your directory.I copy this code to my script.and run it,but I am not sucess.Do I need dim path?
 

rostonix

Известная личность
Регистрация
23.12.2011
Сообщения
29 067
Благодарностей
5 715
Баллы
113
Create variable, name it "path" and set {-Project.Directory-} as value.
 

Кто просматривает тему: (Всего: 1, Пользователи: 0, Гости: 1)