Flicflac - Flac2wav / Wav2flac Single-exe Converter

But not too lazy to attempt a OSX port? :D

Any chance of updating this tool to also accept .aiff’s and or wavs of different bitrates (24 bit currently not supported, I think)?

Pretty please :drummer:

I have copied over 24 gig’s of guitar recordings and like to shrink them in size, unfortunately the recordings are 24 bit aif’s.

If vaporware, are there any other good free tools for this kind of batch conversion?

Hey - long time since I have been in this forum… :)/>

Well, FlicFlac is still maintained, but at a lower rate. You may want to try its bigger brother, File Blender - contrary to FlicFlac, this is a general purpose file processing utility, and you can modify and add your own commands (assuming you have a command line tool that does what you need).

Cheers, will check it out!

If you’ve already installed the flac commandline programme on your Linux box, then the following command will convert any WAV files to FLAC files and remove the WAVS:

(IFS=$'\xa'; find . -type f -iname "*.wav" | while read f; do flac -f "$f" && rm "$f"; done)  

You can save it as a script, called, say, wav2flac.

I’ve also knocked together an unarchiver script:

#!/bin/bash  
#-------------------------------------------------------------------------------  
# Crappy wee script to unpack a directory full of archive files.  
#   
# Produces directories with the same name as the original archives.  
#  
# Handles .zip, .rar and .7z files, but it should be quite clear how to extend  
# its capabilities.  
  
#-------------------------------------------------------------------------------  
# Accept a source directory as a CLA or default to the parent directory  
  
if ["${#@}" -gt 0]; then  
 srcdir="$@"  
else  
 srcdir="$(readlink -f ..)"  
fi  
  
#-------------------------------------------------------------------------------  
# If there's only a single directory in the top level of the archive, promote  
# its contents, and remove it.  
  
function handle_solitary_subdir {  
 if ["1" == "$(ls -1 | wc -l)" -a -d "$(ls)"]; then  
 thedir="$(ls)"  
 mv */* */.[a-zA-Z0-9]* . 1>/dev/null 2>&1  
 rmdir "${thedir}"  
 fi  
}  
  
#-------------------------------------------------------------------------------  
# The real work is done here  
  
function process {   
 ext_pattern="$1" # The archive's extension, using BASH's crappy pattern syntax to catch case wobbling  
 cmd="$2" # The command line for extracting the archive  
  
 # 'a' is for archive  
 for a in "${srcdir}"/*.${ext_pattern}; do   
 ["${a/*/}" != "${a}"] && break  
 f="$(basename "${a}")"  
 mkdir "${f}" >/dev/null 2>&1  
 pushd "${f}" >/dev/null 2>&1  
 eval ${cmd} "${a}" && rm "${a}"  
 handle_solitary_subdir  
  
 # If you want to perform actions on the archive's contents you could do  
 # them now if it's going to help keep the content's size down.  
  
 # e.g.:  
 # IFS=$'\xa'; find . -type f -iname "*.wav" | while read f; do flac -f "$f" && rm "$f"; done  
 # or:  
 # wav2flac  
  
 popd >/dev/null 2>&1  
 done  
}  
  
#-------------------------------------------------------------------------------  
  
which unrar >/dev/null && process "[rR][aA][rR]" "unrar x"  
which unzip >/dev/null && process "[zZ][iI][pP]" "unzip"  
which 7z >/dev/null && process "7[zZ]" "7z x"  
  
#-------------------------------------------------------------------------------  
# vim: sw=2:ts=2:et  
  

I should explain that by default unarchiver assumes it’s running in a directory below the source directory which contains the archive files. You can specify a different source directory as a parameter: ```
unarchiver /some/other/dir