our $zip_cmd = '"c:\Program Files\7zip\7z.exe"'; our $sysvolume = '"-x!System Volume Information"'; my $exclude_list = ''; $exclude_list = " -x!*RECYCLE.BIN -x!*Thumbs.db -x!*desktop.ini"; my $command = $zip_cmd . ' a -r -mx0 -tzip' . $exclude_list . ' ' . $sysvolume . ' ' . $target_zip . ' '; my $ZIP = undef; open($ZIP,"$command |") or die "$package: Could not open pipe for $command, Error: $!\n"; while (my $line = <$ZIP>) { print $line; #Record in the log file $trace and print STDOUT $line; # Report it on the screen if needed } close $ZIP;