Retrosheet has developed three (Windows-only) programs that work with their play-by-play event files.  An event file is essentially a text-based representation of an entire baseball game.  Retrosheet offers event files for nearly every MLB game played since 1953.  For example, here is the event file from Colorado Rockies @ Los Angeles Dodgers game on 4/9/2007.

The first program that I’ll outline is box.exe.  Box.exe creates a box score from the Retrosheet event file.  Here’s how you can use box.exe.

  1. Download box.exe from Retrosheet or here, and unzip the executable file.
  2. Put the event file (or a text file that includes many event files) in the same directory as the box.exe program.
  3. You also need to have a team file included in the same directory.  A team file is text file that lists every team, their league, and their three-letter abbreviation.  The team file must have a filename of TEAMYYYY.  For example, team2007.
  4. Open the Windows Command Prompt.
  5. Navigate to the directory where you stored box.exe, the event file, and the team file.
  6. Type the command: box -y 2007 dodgers_rockies040907.evn (or the name of your event file).  -y 2007 specifies the year of the game.  If you are generating a box score for a game from 1960, make sure you use -y 1960.
  7. If you want to output the box score to a text file, use the command box -y 2007 dodgers_rockies040907.evn > dodgers_rockies_040907_boxscore.txt.

Here is the output from box.exe.

I wrote a script that automatically grabs the current roster of every MLB team and saves it as a ROS file.  This script runs every day at 12:00 PM.  These files are available from the .ROS Files tab at the top of every page.

ROS files are used by Retrosheet’s box.exe, bevent.exe, and bgame.exe programs.  They are plain-text, comma-delimited files having the format: ID, Last Name, First Name, Batting Hand, Throwing Hand, Team Abbreviation, Position Abbreviation.

ID can be any unique ID for the player.  Retrosheet has a unique ID for each player based on first and last name.  For instance, Derek Jeter is jeted001.  Other databases use different formats.  The files that I generate use the 6 digit unique ID used by

The batting hand value can be either R, L, or B (both – switch hitter).

The throwing hand value can be either R or L.

The team value is a three-digit representation of each team.  Retrosheet has established abbreviations for each team.  They are:ANA, ARI, ATL, BAL, BOS, CHA (Chicago American – Whit Sox), CHN (Chicago National – Cubs), CIN, CLE, COL, DET, FLO, HOU, KCA, LAN, MIL, MIN, NYA, NYN, OAK, PHI, PIT, SDN, SEA, SFN, SLN, TBA, TEX, TOR, and WAS.

The position value can be either: P, C, IF, OF, or DH.

As an example, here are the first few lines from the current Atlanta Braves’ ROS file.