New on this site

Lowercase Filenames with Bash on Mac OS X

February 4th, 2010, filed under Apple, General and has no comment

When saving files to my harddrive I'd like the filenames to be in lowercase. It just seems more clean that way. However, I do not like renaming all files manually. So here's a little bash script that can do this automatically:

#!/bin/sh

if [ -n "$1" ]; then
  let count=0
  while [ "$1" ]; do
    f="$1"
    shift
    if [ -f "$f" ]; then
      lc=`echo $f | awk '{print(tolower($0));}'`
      if [ "$lc" != "$f" ]; then
        mv "$f" "$lc"
        ((count++))
      fi
    fi
  done
  echo "Result: $count files have been changed."
else
  echo "Usage: lowerit file(s)"
fi

An example showing the usage of the above script. See full image

Continue reading...
Still Fresh

Batch rename filename extension on a Mac

June 2nd, 2008, filed under Apple, General and has 3 comments

Here's a little shell script I use for renaming the filename extension of multiple files:

#!/bin/sh
for f in *.$1
do
  mv "$f" "${f%$1}$2"
done

I've named this script chgext, and use the following command to rename multiple filename extensions:

~$: chgext JPG jpg

This script will rename the filename extension, for example an uppercase 'JPG' extension, into a lowercase 'jpg' extension of all files in the same directory matching your criteria.

Continue reading...
Microwavable

Howto command-line unrar on Mac OS X

September 2nd, 2007, filed under Apple and has 43 comments

Decompressing *.RAR on a Mac OS X can't be done by default. Of course you could use UnRarX to do this job, though not my cup of tea. I like command-line utilities e.g. par2cmdline and unrar. This post will help you installing the freeware unrar command-line tool from Rarlab.

Installation

Download the full package containing both rar (shareware) and unrar (freeware) from the Rarlab website. I've chosen the RAR 3.70 for Mac OS X package (rarosx-3.7.0.1.tar.gz). Decompress the package (just double click on the .tar.gz file) and you will see a new folder, named rar, containing the necessary files.

Continue reading...
Stone Cold

iTunes Library Auto-Update Mac OS X

July 4th, 2007, filed under Apple, Articles, General and has 72 comments

We all enjoy music, right? Playing your favorite music on a computer isn't difficult. But what if you are a Mac user having hundreds of GB's of MP3 files on an external harddrive?

Why

When I bought a new MacBook it came with iTunes as the default (and probably best) music player from Apple. I'm not going to discuss what music player is better. People claim you're able to work with an Apple right out of the box, so iTunes it is.

Having my music stored on an external drive will keep my laptop's harddrive clean and gives me enough free disk space for storing documents, pictures, games, videos...you know, fun stuff.

Continue reading...

More cold posts

Batch rename filename extension on a Mac

June 2nd, 2008 and has 3 comments

I’ve graduated!

March 13th, 2008 and has 6 comments

Howto command-line unrar on Mac OS X

September 2nd, 2007 and has 43 comments

iTunes Library Auto-Update Mac OS X

July 4th, 2007 and has 72 comments

Safely change WordPress permalink

June 7th, 2007 and has 1 comment

How not to use Powerpoint

June 6th, 2007 and has no comment

GlossyBlue enhanced-wp-contactform Theme!

May 20th, 2007 and has 2 comments

RSS in Plain English

May 20th, 2007 and has no comment

MagSafe is turning red!

May 18th, 2007 and has 1 comment

Light Text on dark Background vs. Readability

March 21st, 2007 and has 7 comments