Advertisement
Guest User

Untitled

a guest
Jun 16th, 2017
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Per 0.50 KB | None | 0 0
  1. use strict;
  2. use warnings;
  3.  
  4. sub process_files {
  5.     my $path = shift;
  6.     opendir (DIR, $path) or die "Unable to open $path: $!";
  7.     my @files = map { $path . '/' . $_ } grep { !/^\.{1,2}$/ } readdir (DIR); closedir (DIR);
  8.     for (@files) {
  9.         if (-d $_) {
  10.             push @files, process_files ($_);
  11.         } else {
  12.            system "ffmpeg -i \"".$_."\" -ab 262144 \"".$_."\".mp3";
  13.         }
  14.     }
  15.     return @files;
  16. }
  17.  
  18. process_files("D:/torrent/Boards Of Canada - The Campfire Headphase");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement