I would like to run the command line Label on multiple files at one time. Is this possible:
vault.exe -host label "file1.txt, file2.png, file3.zip" NewLabel1
Or is there some other syntax for this?
SourceGear Vault client version 4.1.4
Command line: Run single command on multiple files
Moderator: SourceGear
-
- Posts: 3
- Joined: Fri Oct 29, 2010 10:59 am
Re: Command line: Run single command on multiple files
This currently isn't possible. If you don't want to type all the information multiple times you could either use the RememberLogin command first, or create a batch file so that all you have to do is change the file name of what you want labeled.
Another option is to label at the folder level and through inheritance, each file gets covered by that label.
Another option is to label at the folder level and through inheritance, each file gets covered by that label.
Beth Kieler
SourceGear Technical Support
SourceGear Technical Support
-
- Posts: 3
- Joined: Fri Oct 29, 2010 10:59 am
Re: Command line: Run single command on multiple files
Well, that explains why VisualBuildPro was barfing on my command.Beth wrote:This currently isn't possible.
Thanks,
Beaudetious
Re: Command line: Run single command on multiple files
Here's a KB article that may help you some with what you need to do: How to label as part of a build script
Beth Kieler
SourceGear Technical Support
SourceGear Technical Support
-
- Posts: 3
- Joined: Fri Oct 29, 2010 10:59 am
Re: Command line: Run single command on multiple files
Thanks for the pointer Beth. Visual Build Pro has unique actions for working with Vault that implement many of the commands required to integrate with Vault including the Label and GetLabel commands. The main problem was that their interface leads one to believe they can add multiple paths/filenames to the Label command. In reality, Vault throws an error because it can't handle more than one file/path per Label command.
My workaround, at this time, is to just create a separate action item for each file/path I need to label. Per your initial response, I could easily just label a directory (which we do for some of our work) but in this particular case, I have some files in the same directory that are not to be labeled.
I'll rethink my strategy and reconsider moving those files to another non-labeled directory but for now the multiple action steps are working fine.
Thanks for your insight.
My workaround, at this time, is to just create a separate action item for each file/path I need to label. Per your initial response, I could easily just label a directory (which we do for some of our work) but in this particular case, I have some files in the same directory that are not to be labeled.
I'll rethink my strategy and reconsider moving those files to another non-labeled directory but for now the multiple action steps are working fine.
Thanks for your insight.
Re: Command line: Run single command on multiple files
Thank you for the update. I'm sure other users may find this helpful.
Beth Kieler
SourceGear Technical Support
SourceGear Technical Support