Monday, December 23, 2013

Batch renaming of files in OSX using Automator

While I was organizing my photos, I encountered many instances where the filenames of different photos were the same, so I couldn't place them in the same folder without renaming them. It was fine at first when there only a handful of duplicate filenames, but there had to be better way. There was another scenario where I wanted to insert the year before each video so that I could easily group them.

In OSX, there is a built-in tool called Automator, which is found in Applications. Just open it and create an Application. When it opens, just search for rename and drag "Rename Finder Items" to the main window, which will ask you if you want a copy or not. In my case, I did not need a copy. You can change the parameters to something like below. Then save it to your Desktop for easy access.
Inserts the year in front of the files.
To use this, in Finder, select the files you wish to rename and drag them to the Automator icon that you just saved in your Desktop. I have two such icons handy: Append isodate and Prepend Year. After dragging the files from Finder to the Automator icon, your files will have been renamed.


Sunday, December 08, 2013

Android KitKat 4.4.1 on Nexus S (CM11)

My Nexus S was on CM 10.2 (Android 4.2) for a while and held off upgrading to 10.3 (Android 4.3) because there was little difference in the upgrade. Kitkat (Android 4.4), on the other hand, promised good performance on devices with as little as 512MB, so I jumped at the chance when the first Nexus S (crespo) KitKat nightlies started appearing on Cyanogenmod.

I encountered just one hitch in the upgrade and it was related to the clockwork recovery I had. Here are the steps to upgrade from CM 10.2 to CM 11 Nightly.

Backup your phone data
  • Backup your SMS messages. I used the SMS Backup and Restore app.
  • Backup your photos. Just copy the \DCIM\Camera folder to your drive.
  • Backup your phone ROM. Just boot to recovery (Power off, Hold Power and Vol Up button until the recover menu comes up) and do a backup.
Download the following files on your PC
Install Clockwork Recovery
  • Follow instructions on download.cyanogenmod.org/?device=crespo to install the Clockwork Recovery to your phone. (See Installing recovery using fastboot)
  • Note that I didn't wipe the data anymore. I just wiped the cache. All my apps and setting remained intact.
Install CM11
  • Follow instructions on download.cyanogenmod.org/?device=crespo to install the Clockwork Recovery to your phone. (See Installing CyanogenMod from recovery).
Enjoy your Kitkat!