#!/usr/bin/perl use strict; use warnings; my $gsc = 'c:\Program Files\gs\gs9.05\bin\gswin64c.exe'; my $dpi = '150'; my $txt = '4'; my $bld = '4'; GO(); sub GO { my @psfiles = (); my $ein = "C:\\Lokale Daten\\vbv tiffs\\Work\\Spool\\"; my $aus = "C:\\Lokale Daten\\vbv tiffs\\Work\\Tiff\\"; unless (opendir(QV,$ein)) {return;} while (defined (my $Eintrag = readdir(QV))) { next if($Eintrag eq "." or $Eintrag eq ".." or -d $Eintrag); if($Eintrag =~ /\.ps$/) { push(@psfiles,$Eintrag); } } (my $ein_win = $ein) =~ tr/\//\\/; (my $aus_win = $aus) =~ tr/\//\\/; my $count = 0; my $anzhl = @psfiles; foreach (sort @psfiles){ my $dateinew = $_; $dateinew =~ s/\.ps//i; system ('"'.$gsc.'" -q -dSAFER -dNOPAUSE -dBATCH -sDEVICE=tiffg4 -r'.$dpi.' -dTextAlphaBits='.$txt.' -dGraphicsAlphaBits='.$bld.' -sOutputFile='."\"$aus_win\\$dateinew.tif\" -f \"$ein_win\\$_\"\n"); } }