It's all about the answers!

Ask a question

list all files with local.codepage=cp1252


Angelo Corna (26148381) | asked Nov 22 '11, 6:29 p.m.
I've a RTC 3.0 environment and I need to generate a list of files with local.codepage User Properties setted to cp1252.
How can I obtain this information?
How can I search into the User Properties?

Thanks in advance.
Bye.

One answer



permanent link
Angelo Corna (26148381) | answered Nov 24 '11, 10:02 a.m.
I've resolved using the scm command property list.

Here a perl script for a recursive search

use strict;
use File::Find;

my $scm_cmd="/opt/IBM/SDP/scmtools/eclipse/scm";
my $dir="/home/angelo/IBM/rationalsdp/workspace_prod/Hello_World_prj/";
my $url="https://clmweb:9443/ccm";
my $user="CLMADMIN";
my $pwd="xxxxxxxxx";
my $file_out="/home/angelo/get_local_codepage";

open FILE, ">$file_out" or die $!;

sub set_property{
print "analyzing $File::Find::name ............\n";
my $scm_out=`$scm_cmd property list -r $url -u $user -P $pwd $File::Find::name`;
my @row_out=split(/\n/,$scm_out);
for(@row_out){
if (substr($_,2,14) eq "local.codepage"){
print FILE $File::Find::name."\n";
print FILE $_."\n\n";
}
}
}
find(\&set_property,"$dir");

close FILE;

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.