Command Line Interface through cmd Window, or in script

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

Moderator: SourceGear

Post Reply
AAZ

Command Line Interface through cmd Window, or in script

Post by AAZ » Fri Nov 04, 2005 8:50 am

I would like to build some short scripts to do simple/repetitive jobs. I thought that I would do this through cmd or *.bat files. Are there any examples or any books that I might reference to accomplish this.
Further, the help given for the commands in cmd window is limited and I am not sure what is needed in each field and would like more help on this. Anything is appreciated.

thanks

jclausius
Posts: 3706
Joined: Tue Dec 16, 2003 1:17 pm
Location: SourceGear
Contact:

Post by jclausius » Fri Nov 04, 2005 9:16 am

Have you considered the use of a file and the -BATCH option with the command line?

Something like:

vault.exe BATCH vaultcmd.clc -SERVER VaultServer -REPOSITORY repository -USER user -PASSWORD pass

where vaultcmd.clc is full of your Vault comands:

Code: Select all

GET $/dir
CREATEFOLDER $/dir/A
CREATEFOLDER $/dir/A/B
COMMIT
ADD $/dirA/B c:\file1.txt
COMMIT
Jeff Clausius
SourceGear

AAZ

BATCH command line

Post by AAZ » Fri Nov 04, 2005 10:19 am

Thanks, that is very helpful.

Is there any place that has multiple examples of files like this? Any other documentation just a collection of previously built files?

Regards
AZ

jclausius
Posts: 3706
Joined: Tue Dec 16, 2003 1:17 pm
Location: SourceGear
Contact:

Post by jclausius » Fri Nov 04, 2005 1:34 pm

I couldn't find an example on the forum except the one I just posted.

If you know which CLC commands you want to use (see "vault.exe help"), all that is required is to just place each command on its own line in the CLC's file.
Jeff Clausius
SourceGear

Post Reply