Reputation: 71
I am using RTC CLI to get the list of source files of a single component in a Repository Workspace. My script looks like this:
lscm list remotefiles -r local --depth - --workspace "Workspace" "Component" > C:\jazz\Filelist.txt
Now I have to list files for all the components in the workspace. I cannot simply remove the "Component" as it is mandatory according to the syntax:
lscm list remotefiles [options] <selector> <component> [remotePath]
Is there any looping technique in RTC CLI that can be used to get filelist from all the components?
Upvotes: 1
Views: 1057
Reputation: 1325137
Is there any looping technique in RTC CLI that can be used to get filelist from all the components?
Not exactly: you would need to list all components in your workspace, and then call your command to list files for each component.
See for instance "RTC Command Line and Listing Components", where you first create a session, and then list within that session:
creating a login session and using that, ie
lscm login -r https://csnext.myco.com/ccm6/ -u [email protected] -n mySession
lscm list components -r mySession
Andrew Niefer suggests:
It would be better to specify the
-u
option to get UUIDs rather than using component names.
lscm -u y list components -r mySession
Also, depending on the scripting language, it may be better to specify
-j
to get json output.
Upvotes: 1