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

  • Автор темы Автор темы 455919946
  • Дата начала Дата начала

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
 
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
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?
 
Create variable, name it "path" and set {-Project.Directory-} as value.
 

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