Ask a Question

How do I return a directory?

evertonalmeida
Occasional Contributor

How do I return a directory?

Good Morning,

How do I return a directory?

 

Ex: my ProjectSuite is in: X: \ GRV \ CPS5 \ Projects \ TestComplete \ Registrations \

 

I would like to get the string: X: \ GRV \ CPS5 \ Projects \ TestComplete \

 

Thank you

4 REPLIES 4
shankar_r
Community Hero

Re: How do I return a directory?

Project.Path will return project path

ProjectSuite.Path will return project suite path


Thanks
Shankar R

LinkedIn | CG-VAK Software | Bitbucket | shankarr.75@gmail.com

“You must expect great things from you, before you can do them”

Extension Available

evertonalmeida
Occasional Contributor

Re: How do I return a directory?

Sim, mas preciso retornar um diretório antes do ProjectSuite

shankar_r
Community Hero

Re: How do I return a directory?

I don't think you will get that path by default, need to do some scripting do the same.

 

Please type here English otherwise we need to understand like below 🙂

 

transl.PNG 

 

 


Thanks
Shankar R

LinkedIn | CG-VAK Software | Bitbucket | shankarr.75@gmail.com

“You must expect great things from you, before you can do them”

Extension Available

sanjay0288
Frequent Contributor

Re: How do I return a directory?

Which scripting language are you using? A sample vbscript snippet is provided below. Which might be of some help

 

Sub GetParentFolder
    suitePath = projectsuite.Path
    Set objFSO = CreateObject("Scripting.FileSystemObject")
    Set objFldr = objFSO.GetFolder(suitePath)
    MsgBox objFldr
    strFolder = objFSO.GetParentFolderName(objFldr)  
    MsgBox strFolder
End Sub

cancel
Showing results for 
Search instead for 
Did you mean: