#!/usr/bin/perl use strict; use warnings; use Config::Tiny; my $debug = 0; my $Configfile = "config.conf"; my $outputdir = "C:\\Outputdir"; my $Config = Config::Tiny->new(); $Config = Config::Tiny->read( $Configfile ); my $zipdir = $Config->{Config}->{Zip_Out}; my $somedir = $Config->{Config}->{Somedir_Path}; my $parser = $Config->{Config}->{Parser_Path}; my $xercesimpl = $Config->{Config}->{xercesImpl_Path}; my $encode = $Config->{Config}->{Encode_Command}; my $name = $Config->{Config}->{Name}; my $destination = $Config->{Config}->{Destination}; if (opendir (ZIPDIR, "$zipdir") ) { foreach my $zippedgif(readdir(ZIPDIR) ) { next if $zippedgif =~ /^\./; system("java -cp \"$somedir;$parser;$xercesimpl\" $encode \"$zipdir\\$zippedgif\" \"$outputdir\\$name\" $destination"); if ($debug) { print "DEBUG \nResult: $?\n" }; sleep 3; } } else { print "Error opening $zipdir: $!\n"; } closedir (ZIPDIR);