Hi!
I want do make a search and download all files with ".csproj" inside a folder.
I have tried achieving this via the Client API command prompt application.
When running this command:
vault.exe findinfolder "*.csproj" "RootFolder/SubFolder" -host "{HOST}" -username "{USERNAME}" -password "{PASSWORD}" -repository "{REPO}"
I get the error: "No object was found at the repository part: RootFolder/SubFolder
I have also tried with specifying the path with $ as:
vault.exe findinfolder "*.csproj" "$/RootFolder/SubFolder" -host "{HOST}" -username "{USERNAME}" -password "{PASSWORD}" -repository "{REPO}"
This gave me this error: The repository's index is not currently enabled.
Is this something I have to enable?
Please note that I necessarily want to search the file contents, only the filename. Is there a better way?
// Peter Åslund
Searching for files (Client API)
Re: Searching for files (Client API)
You can try the GetWildCard command for that. Here's the info on that command: http://download.sourcegear.com/Vault/8. ... ETWILDCARD.
Beth Kieler
SourceGear Technical Support
SourceGear Technical Support
-
- Posts: 5
- Joined: Mon Aug 31, 2015 5:53 am
Re: Searching for files (Client API)
Thank you! The GetWildCard command was exactly what I needed.
Can I suggest the feature that you can specify multiple wildcards. For example specifying multiple file extensions as:
".csproj;.sln"
And also showing how many files that where copied, in the xml result.
Thank you for the help
Can I suggest the feature that you can specify multiple wildcards. For example specifying multiple file extensions as:
".csproj;.sln"
And also showing how many files that where copied, in the xml result.
Thank you for the help
Re: Searching for files (Client API)
I've logged your requests. Thank you for your feedback.
F: 18161, 18162
F: 18161, 18162
Beth Kieler
SourceGear Technical Support
SourceGear Technical Support
Re: Searching for files (Client API)
Scratch one of those. I think you can currently get by multiple wild cards. Separate each by a space and see if that gets you the results you need.
For example,
Same thing can be done with the regular GET. There is a character limit that Windows sets, so will have to watch the number of items entered.
For example,
Code: Select all
vault.exe -user xxx -password yyy -repository zzz GETWILDCARD $/some/path/ *.csproj *.sln *.h
Beth Kieler
SourceGear Technical Support
SourceGear Technical Support