1 |
|
---|
2 |
|
---|
3 |
|
---|
4 |
|
---|
5 |
|
---|
6 |
|
---|
7 |
|
---|
8 |
|
---|
9 |
|
---|
10 |
|
---|
11 |
|
---|
12 |
|
---|
13 |
|
---|
14 |
|
---|
15 |
|
---|
16 |
|
---|
17 |
$path = $0; |
---|
18 |
$path =~ s/deletemovie.pl$//i; |
---|
19 |
if ($path ne "./"){ |
---|
20 |
push( @INC, "$path"); |
---|
21 |
} |
---|
22 |
|
---|
23 |
require "foltialib.pl"; |
---|
24 |
|
---|
25 |
|
---|
26 |
$fname = $ARGV[0] ; |
---|
27 |
if ($fname eq "" ){ |
---|
28 |
|
---|
29 |
print "usage;deletemovie.pl <FILENAME>\n"; |
---|
30 |
exit; |
---|
31 |
} |
---|
32 |
|
---|
33 |
|
---|
34 |
if ($fname =~ /.m2p$|.m2t$/){ |
---|
35 |
|
---|
36 |
}else{ |
---|
37 |
|
---|
38 |
&writelog("deletemovie invalid filetype:$fname."); |
---|
39 |
exit (1); |
---|
40 |
} |
---|
41 |
|
---|
42 |
|
---|
43 |
|
---|
44 |
if (-e "$recfolderpath/$fname"){ |
---|
45 |
|
---|
46 |
}else{ |
---|
47 |
|
---|
48 |
&writelog("deletemovie file not found:$fname."); |
---|
49 |
exit (1); |
---|
50 |
} |
---|
51 |
|
---|
52 |
|
---|
53 |
if ($rapidfiledelete > 0){ |
---|
54 |
system ("mv $recfolderpath/$fname $recfolderpath/mita/"); |
---|
55 |
&writelog("deletemovie mv $recfolderpath/$fname $recfolderpath/mita/."); |
---|
56 |
}else{ |
---|
57 |
system ("rm $recfolderpath/$fname "); |
---|
58 |
&writelog("deletemovie rm $recfolderpath/$fname "); |
---|
59 |
|
---|
60 |
|
---|
61 |
} |
---|
62 |
|
---|
63 |
|
---|
64 |
|
---|