From owner-freebsd-questions@FreeBSD.ORG Sat May 7 21:03:53 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9DD6D106564A for ; Sat, 7 May 2011 21:03:53 +0000 (UTC) (envelope-from chris@monochrome.org) Received: from mail.monochrome.org (b4.ebbed1.client.atlantech.net [209.190.235.180]) by mx1.freebsd.org (Postfix) with ESMTP id 5456A8FC0C for ; Sat, 7 May 2011 21:03:53 +0000 (UTC) Received: from [192.168.1.11] ([192.168.1.11]) by mail.monochrome.org (8.14.3/8.14.3) with ESMTP id p47L3qBw054641; Sat, 7 May 2011 17:03:52 -0400 (EDT) (envelope-from chris@monochrome.org) Date: Sat, 7 May 2011 17:03:52 -0400 (EDT) From: Chris Hill To: Antonio Olivares In-Reply-To: Message-ID: References: User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: FreeBSD Questions Subject: Re: fix an audio conversion script to work through multiple directories and convert mp3s to ogg vorbis X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 May 2011 21:03:53 -0000 On Sat, 7 May 2011, Antonio Olivares wrote: > My question is the following: > How can I run the script to recursively find all mp3's and convert them > to ogg vorbis(with ogg extension already in place/or rename them in one > step[instead of running two scripts] and deleting the mp3's) all in one > time? I had a similar (but not identical) problem, and I wrote a script to solve it. I wanted to recursively go through a directory tree, find flac files, and make mp3s of them while transferring over the ID3 tags, while keeping a duplicate directory structure for the mp3s. And don't do the conversion if the file already exists. My script is based on traverse2.sh by Steve Parker, which is at http://steve-parker.org/sh/eg/directories/. His tutorial site is extremely helpful, and I recommend it. My script is at http://pastebin.com/77NRE6SZ - maybe you can adapt it to your needs. HTH. -- Chris Hill chris@monochrome.org ** [ Busy Expunging ]