You are not logged in.

#1 2010-11-18 12:04:14

pablokal
Member
From: Nijmegen, Holland
Registered: 2010-03-07
Posts: 96
Website

Example of a batch conversion script: convert all files in a folder ap

Convert all files in folder from ape to wav
Convert all files in a folder from ape to wav in Arch
Example of a batch conversion script

First install mac (http://www.archlinux.org/packages/community/i686/mac/ ) by doing
sudo pacman -S mac

Copy the text below in a text file, call it ape2wav and make it executable (chmod 755 it)

#! /bin/bash
cd $1 # change to the directory we passed as a parameter
for a in *.ape; do # only process ape files
if [ -f "$a" ]; then # is it a file? We _could_ have a me.ape directory
b="${a%.ape}" #set b to filename only
mac "${b}.ape" "${b}.wav" -d
fi
done

Put it in /usr/bin. Now doing ape2wav /home/paul/apefolder will extract the audiofiles to wav. Of course change user and folder name.


GNu/Linux: Nu nog schoner: http://linuxnogschoner.blogspot.com/

Offline

Board footer

Powered by FluxBB