How to detect if a given project folder exists in Vault?

If you are having a problem using Vault, post a message here.

Moderator: SourceGear

Post Reply
Mordachai
Posts: 84
Joined: Sun Feb 24, 2013 11:58 am

How to detect if a given project folder exists in Vault?

Post by Mordachai » Wed Nov 06, 2013 12:04 pm

In VSS, I could use

Code: Select all

SS CP "$Root/Sub1/Sub2/MyProject"
and then look at the error level (return code) from SS.exe to see if it was able to set the specified project as current, and therefore whether it exists or not.

How can I accomplish this in Vault?

pseudo-code:

Code: Select all

VAULT CHECK_IF_EXISTS "%MyProjectPath"

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Re: How to detect if a given project folder exists in Vault?

Post by Beth » Wed Nov 06, 2013 4:47 pm

One thing you could try is to use the History command, but filter by the file name, then parse the results. If it works, it should come back with a true: http://download.sourcegear.com/misc/vau ... tm#HISTORY.
Beth Kieler
SourceGear Technical Support

Post Reply