Command Line - BATCH

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

Moderator: SourceGear

Post Reply
clarkec21
Posts: 17
Joined: Wed Aug 22, 2012 9:51 am

Command Line - BATCH

Post by clarkec21 » Wed Nov 15, 2017 11:45 am

Hi

I want to use the "BATCH" command but cannot find a decent example of how to use it:

Here is my command that works
@echo SHARE "<>" "<>" -commit |"C:\Program Files (x86)\SourceGear\Vault Client\vault.exe" BATCH - -host "<>" -user "<>" -repository "<>"

How do I now specify another command for the same session? HELP and KB were of no use.

Thanks

Craig

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

Re: Command Line - BATCH

Post by Beth » Thu Nov 16, 2017 4:50 pm

You need to put your commands into a text file, then run your batch command but at the end put the name of the file that holds the other commands.

For example, vault.exe BATCH -host myhost -user myuser -password mypassword -repository "Initial Repository" abatch.txt

Then in my text file is something like:

GET $/Documents/Folder2
CHECKOUT $/Documents/Folder2/Test2c.txt
DELETE DetectThis2.txt
COMMIT $
Beth Kieler
SourceGear Technical Support

clarkec21
Posts: 17
Joined: Wed Aug 22, 2012 9:51 am

Re: Command Line - BATCH

Post by clarkec21 » Fri Nov 24, 2017 4:53 am

Thank you Beth

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

Re: Command Line - BATCH

Post by Beth » Fri Nov 24, 2017 1:42 pm

You're welcome.
Beth Kieler
SourceGear Technical Support

Post Reply