I started working part-time for Hallway 2 Marketing last year, 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 Ruby Script

screen-shot-2017-02-20-at-11-13-12-am

The files before the script

before

Script execution

command-win

The result…files ready to upload to HAR

result

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

Advertisements