# Functions
#-----------------------------------------------------------------------------
+#------------------------------------------------------------------------------
+# Function: Add all files of a specific directory
+# Parameters: $message
+# Input: Directory path
+# Output: None
+# Return: Array with list of files
+#------------------------------------------------------------------------------
+sub addDirectory {
+ my ($dir,@list) = @_;
+ my $dirH;
+ opendir($dirH, $dir) || die ("Can't open '$dir'");
+ while ($_ = readdir($dirH) ) {
+ if (-f "$dir/$_") {
+ push @list, "$dir/$_";
+ }
+ }
+ closedir($dirH);
+ return @list;
+}
+
#------------------------------------------------------------------------------
# Function: Write an error message and exit
# Parameters: $message
elsif ($ARGV[$_] =~ /ignoremissing/i) { $IgnoreMissing=1; }
else { print "Unknown argument $ARGV[$_] ignored\n"; }
}
+ elsif ($ARGV[$_] =~ /addfolder=(.*)$/i) {
+ @ParamFile = addDirectory($1, @ParamFile);
+ }
else {
push @ParamFile, $ARGV[$_];
$cpt++;
print " $PROG.$Extension [options] file\n";
print " $PROG.$Extension [options] file1 ... filen\n";
print " $PROG.$Extension [options] *.*\n";
+ print " $PROG.$Extension [options] addfolder=dirname\n";
print " perl $PROG.$Extension [options] *.* > newfile\n";
print "Options:\n";
print " -dnslookup make a reverse DNS lookup on IP adresses\n";