import System.Process
import System.Directory
import System.FilePath.Posix
import Control.Monad
import Data.List
doCom x f = createProcess
(proc "ffmpeg" ["-i",x,"-sample_fmt", "s16", "-ar", "44100",nf])
where nf = f:".flac"
filtFile fi = return . filter (\x -> takeExtension x == fi)
sort' = return . sort
main = do
fs <- getCurrentDirectory >>= listDirectory >>= filtFile ".flac" >>= sort'
print fs
zipWithM_ (\x y -> doCom x y) fs ['a' .. 'z']
0 件のコメント:
コメントを投稿