$exclude_list = " -x!*RECYCLE.BIN -x!*Thumbs.db -x!*desktop.ini"; print "$now $package: Exclude List: " . $exclude_list . "\n\n"; $now = timestamp(); print "$now $package: Commencing ZIP to $target_path\n"; chdir $source or die "$package: Could not chdir $source, Error: $!\n"; #my $command = $zip_cmd . ' a -r -mx0 -tzip' . $exclude_list . ' ' . $sysvolume . ' ' . $target_zip . ' '; # Form the Zip command #my $command = "$zip_cmd a -r -mx0 -tzip $exclude_list $sysvolume $target_zip "; # Form the Zip command my $result = `( $command ) 2>&1`; #$monitor_flag and print STDOUT "$command\n"; $monitor_flag and print STDOUT "$result\n"; my $ZIP = undef; open($ZIP,"$result |") or die "$package: Could not open pipe for $result, Error: $!\n"; #open($ZIP,"$command |") or die "$package: Could not open pipe for $command, Error: $!\n"; while (my $line = <$ZIP>) { print $line; $trace and print STDOUT $line; } close $ZIP;