Use JavaScript for Automation to rename files in batch!
While working on some client-side code at Oozou, I often have to rename a lot of image files.
For example, Bourbon uses _2x.png for retina images, rather than @2x.png used by Retina.js.
I used to do this manually, until I am fed up and write this script.

doesn't work on my machine.
mid 2010 imac 10.10.3
I learning, a noob beginner. I cut and pasted the code. Gave it a directory and three files. It says there are no files.