tom.peters Posted January 17, 2011 Report Share Posted January 17, 2011 Good Day - I need to be able to checkin a series of files through the CLI using a wild card so that they all hit the same changeset. For example, I have 90 folders, all of which have a file starting with "pc" and ending with ".sru". I'd like to be able to specify the root folder and have all such files checked in using recursion and a wildcard. Here is what I thought would work: cm ci -R "C:\rootfolder\" "pc*.sru" I don't want to specify each file in its own 'cm ci' because I will have 90 changesets. I want all 90 files checked in under one changeset. Any ideas? Thanks, Tom Link to comment Share on other sites More sharing options...
jgonzalez Posted January 18, 2011 Report Share Posted January 18, 2011 Hi Tom, The command you have to run from your workspace root path would be: cm ls pc*.sru -R --format={7} | cm ci - cm ls <workspace_root_path>/pc*.sru -R --format={7} | cm ci - Tell me whether it works for you -Jes Link to comment Share on other sites More sharing options...
tom.peters Posted January 18, 2011 Author Report Share Posted January 18, 2011 Hi - When I run either of these examples I get "The given path's format is not supported." Thanks, Tom Link to comment Share on other sites More sharing options...
jgonzalez Posted January 18, 2011 Report Share Posted January 18, 2011 Hi Tom, Can you please paste the output of the following command? (executed from your workspace root path) cm ls pc*.sru -R --format={7} Link to comment Share on other sites More sharing options...
tom.peters Posted January 18, 2011 Author Report Share Posted January 18, 2011 Hey! True to form, I must have mistyped something before (over and over because I tried it a few times). This works now, provided I am in the correct folder... However, I need to be able to do a recursive checkout/checkin for my workspace regardless of the current path location. You first example looks like I can, but I cannot seem to get that working. Is there a way to specify the workspace so I don't have to CD to the path first? Thanks, Tom Link to comment Share on other sites More sharing options...
jgonzalez Posted January 18, 2011 Report Share Posted January 18, 2011 Hi Tom, You can type the following command from any path: cm ls <absolute_path_to_your_workspace_path>\pc*.sru -R --format={7} | cm checkout - The command above lists all the files matching the pattern "pc*.sru" from the workspace path you entered, and returns the full path of matching files ("--format={7}", as "cm help ls" states). Then, the output of the "cm ls" command is piped to the "cm checkout" command, and the final dash means that the input to the "cm checkout" command comes from the output of the previous command, the "cm ls". Another option could be the following, if you're on windows: dir <absolute_path_to_your_workspace_path>\pc*.sru /s /b | cm checkout - To checkin those files, type the following command: cm ls <absolute_path_to_your_workspace_path>\pc*.sru -R --format={7} | cm checkin - or dir <absolute_path_to_your_workspace_path>\pc*.sru /s /b | cm checkin - -Jes Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.