1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
#! /usr/bin/perl
### mp3 and wma to ogg by darklinux presents
###no warrenty
use warnings;
use File::Find ();
$dir=`pwd`;
chomp($dir);
opendir(CHECKDIR,"$dir");
while ($file=readdir(CHECKDIR)) {
$orig_file=$file;
if($orig_file =~ m/\.mp3$/i)
{
print "Checking file: $orig_file\n";
$new_wav_file=$orig_file;$new_wav_file=~s/\.mp3/\.wav/;
$new_ogg_file=$orig_file;$new_ogg_file=~s/\.mp3/\.ogg/;
$convert_to_wav="mplayer \"./$orig_file\" -ao pcm -aofile \"./$new_wav_file\"";
$convert_to_ogg="oggenc -q 4 \"./$new_wav_file\" \"./$new_ogg_file\"";
$remove_wav="rm -rf \"./$new_wav_file\"";
$remove_mp3="rm -rf \"./$orig_file\"";
print "EXEC 1: $convert_to_wav\n";
$cmd=`$convert_to_wav`;
print "EXEC 2: $convert_to_ogg\n";
$cmd=`$convert_to_ogg`;
print "REMOVE WAV: $remove_wav\n";
$cmd=`$remove_wav`;
print "REMOVE MP3: $remove_mp3\n";
$cmd=`$remove_mp3`;
print "\n\n";
}
elsif($orig_file =~ m/\.wma$/i)
{
print "Checking file: $orig_file\n";
$new_wav_file=$orig_file;$new_wav_file=~s/\.wma/\.wav/;
$new_ogg_file=$orig_file;$new_ogg_file=~s/\.wma/\.ogg/;
$convert_to_wav="mplayer \"./$orig_file\" -ao pcm -aofile \"./$new_wav_file\"";
$convert_to_ogg="oggenc -q5 \"./$new_wav_file\" \"./$new_ogg_file\"";
$remove_wav="rm -rf \"./$new_wav_file\"";
$remove_wma="rm -rf \"./$orig_file\"";
print "EXEC 1: $convert_to_wav\n";
$cmd=`$convert_to_wav`;
print "EXEC 2: $convert_to_ogg\n";
$cmd=`$convert_to_ogg`;
print "REMOVE WAV: $remove_wav\n";
$cmd=`$remove_wav`;
print "REMOVE WMA: $remove_wma\n";
$cmd=`$remove_wma`;
print "\n\n";
}
elsif ($orig_file =~ m/\.mpc$/i)
{
print "Checking file: $orig_file\n";
$new_wav_file=$orig_file;$new_wav_file=~s/\.mpc/\.wav/;
$new_ogg_file=$orig_file;$new_ogg_file=~s/\.mpc/\.ogg/;
$convert_to_wav="mppdec \"./$orig_file\" \"./$new_wav_file\"";
$convert_to_ogg="oggenc -q5 \"./$new_wav_file\" \"./$new_ogg_file\"";
$remove_wav="rm -rf \"./$new_wav_file\"";
$remove_mpc="rm -rf \"./$orig_file\"";
print "EXEC 1: $convert_to_wav\n";
$cmd=`$convert_to_wav`;
print "EXEC 2: $convert_to_ogg\n";
$cmd=`$convert_to_ogg`;
print "REMOVE WAV: $remove_wav\n";
$cmd=`$remove_wav`;
print "REMOVE MPC: $remove_mpc\n";
$cmd=`$remove_mpc`;
print "\n\n";
}
}
use Qt;
my $a = Qt::Application(\@ARGV);
my $quit = Qt::PushButton("Fertig", undef);
$quit->resize(100, 30);
$quit->setFont(Qt::Font("Times", 18, &Qt::Font::Bold));
$a->connect($quit, SIGNAL('clicked()'), SLOT('quit()'));
$a->setMainWidget($quit);
$quit->show;
exit $a->exec;
nun möchte ich gerne wissen wie ich es anstellen kann das s,das script unterordner öffnet.