... $DATAPATHBilder = "/PfadzudenBildern"; $x=0; open(LS,"/bin/ls ../Bilder |")||print "LS"; while(){ $FILELISTB{$x} = $_; ($bild, $ext) = split (/\x2e/, $FILELISTB{$x},2); $bild_alt = "$bild.$ext"; $bild_neu = $bild . "_" . $heute . "." . $ext; print "Altes Bild: ../Bilder/$bild_alt\n"; print "Neues Bild: ../Bilder/$bild_neu\n"; $success = move("../Bilder/$_", "../Bilder/$bild_neu"); if (!$success){ print "Datei konnte nicht verschoben werden. Grund: $!\n"; } $x=$x+1; } close(LS);