SHARE
TWEET

Untitled

a guest Jun 16th, 2017 91 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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");
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top