Automation on an Apple – Batch renaming files on a Mac

The subtitle of this page could be “how to carefully rename 1,000 files.”

In my work with the Center for Railroad Photography and Art I handled a range of digitization and file management project. Each has required it’s own approach and I’ve learned a lot about Apple automation technologies working in a recent aspect of the project. It’s using the Apple tool “Automator” in two different ways. While I have some experience using other automation programs like MacroExpress and other File Renaming tools on a PC this was my first attempt on a Mac. And I think it went pretty well! Here was the problem and the solution I developed to solve this problem.

The Problem

Springer file names

The digital files were named using the actual photographic metadata. While this might seem great, it created two fundamental problems: (1) the digital files were out of order (relative to the original order of the collection) and (2) it did not match the file naming conventions I had established for this collection. So my task was to remedy this problem and (1) put the digital files in the same order as the physical collection and (2) extend the current file naming conventions to this part of the collection.

Organizing the Files

The first step was to organize the files. To do this, I decided to rename each file in some sort of alpha-numeric system. This seemed both easy and tedious. To make it slightly easier, I using the Automator service on the Mac to create a service. On a macro level, I could click a button and make a copy of the file that would then be organized in box order in a separate folder.

Here is this workflow in detail:

Screenshot of Apple Automator

  1. Copy Finder Item to a new folder – This created a second copy of the file that allowed me to explore and experiment without trouble.
  2. Rename the folder by adding the date/time function “seconds from midnight” to the front of the file name- The “seconds from midnight” function was totally arbitrary but provided a nice, easy way to sort the files.
  3. Save this as a “service” – Saving this as a service gave me easy access to trigger this automated workflow from anywhere in the finder.

After I established this workflow, I started going though the box. Once I found the digital file that corresponded to my first negative I would trigger this service. Thus, as I progressed through the box of negatives I would create a new folder of digital images in the correct order. Huzzah!

Renaming the Files

The end result of the first automated process was a folder of files in the correct order. However, the file names were terrible. For example:

Screenshot of organized files.

The leading numbers allow this list to be sorted into the correct order but this file naming convention was a huge mess. However, another automated workflow quickly solved this problem. The steps of this process were:

  1. Find Finder Items – This step ingested the files I created through the rename service
  2. Sort Finder Items – Although this step might seem redundant it provided to be critical to get the sorting correct. I simply sorted by name in ascending order to make this workflow work.
  3. Copy Finder Items – Again, because this was my first time using the Automator I wanted to create back-up copies of my work. I copied the items to yet another folder so that I could sort them.
  4. Make Sequential – This is the important step! I made them sequential by adding a new name (in this case I replaced the existing name with “Springer_01”) and then by placing a number after the name. I separated this number with an underscore and asked the program to make all numbers three digits long.
Apple's Automator - my new best friend.
Apple’s Automator – my new best friend.

The End Result

The result of these two processes created a perfectly organized folder of items that was named according to our established conventions. Doing this renaming work manually (without the Automated workflows) would have been possible but extremely labor intensive and prone to many different errors. This workflow saved hours of work and streamlined the process to prevent errors.

Additionally, this workflow is very general and could easily be applied to other file renaming projects.

Relative to other automation tools, Apple’s Automator is a strong contender. Because it is part of the Mac OS it integrates perfectly and natively with many Apple services and systems and offers a wide range of options. I would definitely seek to use the Automator on all future digital projects in a Mac environment.

Reflections on the processing the Springer collection – Notes

Overview of the process

  1. Overview of the Springer Collection
    1. I’ve been working with a collection of black and white negatives donated to the Center for Railroad Photography and Art by Fred Springer.
    2. Fred Springer traveled through the United States and world taking pictures of trains, train workers, and other buildings and equipment.
    3. This collection is contained in 6 boxes and likely contains around 8,000 images.
    4. A particularly strong collection of steam trains and narrow gauge trains.
  2. Scanning
    1. Done by a Lake Forest College student workers.
    2. Overall, the quality of scans was pretty good.
    3. Some minimal cleanup (re-scanning blurring images, scanning “skipped” images)
  3. Metadata Creation/Entry
    1. Here is the metadata we are recording for each image:
      1. File Name (Identifier)
      2. Railroad Reporting Mark
      3. Railroad Name
      4. Description on Envelope
      5. Location (City)
      6. Location (State)
      7. Location (Country)
      8. Date Created (yyyy-mm-dd)
      9. Location (Mile Post)
      10. Original Extent (Physical Size of the Original)
      11. Original Format = black and white negative
      12. Type = Image
      13. Creator = Springer, Fred or
      14. Collection = Springer Collection
      15. Scanning Issues [to record technical issues with the scanning process; not for public display!]
    2. Our metadata standards really focused on transcribing existing metadata.
      1. I didn’t attempt to determine the location of a station or the type of train if that information didn’t exist on the envelope.
      2. I made some minimal corrections for obvious mistakes (spelling errors) but relied heavily on the original descriptions.
  4. Processing/Quality Control
    1. Make sure the digital file name correspond to the metadata.
    2. Preserve original order and context to the extent possible.

What I learned

  1. The importance of metadata in special collections.
    1. Metadata is context specific
      1. Railroad markings
      2. Mile post
      3. “Whyte notation” to classify wheel arrangement on steam locomotives
    2. Metadata should be context independent.
      1. Entering “standard” metadata fields for each item.
      2. Thinking about future (computerized) systems re-using and re-interpreting the data in interesting ways.
      3. Serials podcast daydream.
    3. Metadata creation balances current needs (user groups, uses, resources, staff expertise) and future needs (anticipates a larger world, metadata standardization for computerized processing, etc.)
  2. Effective processing requires conceptual and technical abilities.
    1. There really isn’t a distinction between the two.
    2. Hardware constraints (better equipment is better).
    3. It also requires self-reflection. Is this working? Is that scan good enough? Is that worth the time?
  3. The art of project management; there are advantages and disadvantages to dividing projects.
    1. Scanning and description were separate processes. Doing both together may have been faster…but it might not have been.
    2. The combined process (scanning and metadata) involved switching between many programs. Lots of opportunities for errors.
    3. The divided process created smaller “chunks” and more levels of accountability but also required duplicate labor (and physical processing)
    4. Also aware that Anne, for example, is managing many different projects and responsibilities simultaneously.
  4. More Product, Less Process (MPLP)
    1. A major archival philosophy in the last 10 years.
      1. Essentially, don’t hold all collections to the same “golden standard”
      2. Adequate processing and description is totally adequate – don’t think of it as “cutting corners”
    2. In my estimation, we followed the MPLP philosophy when processing this collection.
      1. The digital scans are of decent quality but were not done at the highest resolution possible. Publication would require re-scanning and editing.
      2. The metadata we created is good but isn’t comprehensive.
    3. Given the nature and size of this collection, the MPLP philosophy fits this collection perfectly. How could we justify a “more process less product” approach to this collection?
    4. However….I must confess that I still had some emotion pulls to abide by “the gold standard” of processing and description.

These lessons in metadata creation, effective processing, project management, and the “more product, less process” philosophy have made this internship a really rich experience for me.