Coding: Ruby File Rename Script

In February of this year I started working part-time for Hallway 2 Marketing, photographing homes for real estate. I take the photos then rush home to start the edit process. Before the photos can be uploaded to HAR, they need to be a specific file name to make searches easier on the perspective home buyer. So I wrote a program to help me streamline at least part of my process.

I wrote a Ruby program to rename files by stripping off the first 8 characters of the existing file name. As I edit real estate photos, I name them like the following: DSC_XXXX Street - Living Room.jpg - the program basically loops through 30+ files stripping off the DSC_XXXX making the file name "Street - Living Room.jpg"

The files before the script

The files before the script

Script execution

Script execution

The result...files ready to upload to HAR

The result...files ready to upload to HAR

This is the first code I've written since I quit being a developer in 2011. The process has sparked my interest in coding again...at least for fun. LOL