Cécile_Hugbart_5030

REGISTER Variables

Discussion created by Cécile_Hugbart_5030 on Jun 2, 2016
Latest reply on Jun 6, 2016 by Michael_Lowry
Hello,

I'm trying to retrieve variables from the workflow with  a Perl script.

:BEGIN_EXT_INT PERL
my $dir = 'C:\\TEST\\LIVRAISON\\';
if (! opendir( DIR, $dir) ) {
print "Impossible d'ouvrir le répertoire $dir : $!.";
return undef;
}
my @files = grep !/(?:^\.$)|(?:^\.\.$)/, readdir DIR;
closedir DIR;
my $i=0;
foreach(@files) {
next if (($_ =~ /DMBD/ig)||($_ =~ /LOG/ig)||($_ =~ /LST/ig)||($_ =~ /SQL/ig)||($_ =~ /dump/ig));
if (-d $dir."\\".$_) {
print "\n\nREPERTOIRE : ".$_."\n";
:REGISTER_VARIABLE "rep$i#", "$_"
}
$i++;
}
:END_EXT_INT PERL

Any help will be greatly appreciated.

Thanks

Outcomes