FieldNotes - Unpacking an SLR (library) file

FieldNotes exports datasets in the form of static library resource (SLR) files, to ensure that the contents (three separate files) can be referenced as a single entity at any point in the future. A standalone utility program 'viewslr.exe' (distributed with FieldNotes) is provided for unpacking the data from the exported SLR file.

This document describes the methods and commands used to extract information and data from the exported data files.

Before starting you will need ...

Locating the FieldNotes application folder

There are several ways of finding the location where FieldNotes is installed:
  1. If you have a FieldNotes icon on your desktop, right-click on it, select 'properties' from the menu, then select the 'Find Target'/'Open File Location' button (depending which version of Windows you are using) on the 'General' propertysheet page. This will open the relevant folder.
  2. Navigate in the 'Explorer' window to the Program Files folder (usually C:\Program Files), then to the 'GreenManSoftware' Folder, then to the 'FieldNotes' folder. You may need to change the Explorer settings to view hidden folders.
  3. Search for the file 'FieldNotes.exe' using the search facility in Windows Explorer.
(The application folder is generally something similar to: 'C:\Program Files\GreenManSoftware\FieldNotes', depending on your OS version.)

I have worked through the whole process with a sample export (SLR) file to ensure that all the steps are listed. The description is split into two sections; the first renames the SLR file (for simplicity) as proof of concept, whilst the second provides a more detailed description of the command-line arguments.

Preliminary Steps

Copy the three files (the_exported_data.slr, viewslr.exe, viewslr.cmd) to a working folder.

Start a command prompt window:

Change directory to the working folder (in the example below this is 'C:\WORK\temp', which is assumed to already exist).

change directory to the working folder

1. Proof of concept

Copy or rename the exported SLR file to 'test.slr'. (This is the default filename that the unpacking utility will look for if no arguments are provided.)

1.1 Display a summary of the SLR file

In the command line window type:

to run the SLR viewer in summary mode. A summary of the SLR file is displayed on the screen.

1.2 List SLR file contents

In the command line window type:

to run the SLR viewer in report (listing) mode. (The argument following the filename is a minus and lowercase L).

A list of the SLR file contents is displayed on the screen.

1.3 Export SLR file contents

In the command line window type:

to run the SLR viewer in export mode. (The argument following the filename is a minus and lowercase E).

A new sub-folder, named after the SLR file, is created and the contents of the SLR file extracted into it.

The following files should be present:

As their name suggests, the csv files contain the exported Observations and associated Site datasets.

2. Working with named files

In addition to the -l and -e options described above, the argument -i followed by a string will allow you to specify the SLR input filename.

To process the SLR file 'Green_Man_Software#21_02_2013.slr' (used here as an example), the arguments may be combined as follows.

2.1 Display a summary of the SLR file

2.2 List SLR file contents

2.3 Export SLR file contents

2.4 Batch file processing

The long filenames used for exporting datasets are not ideal for for single-use command-line programs. However with very little knowledge, batch (command) files can easily be used to create a pipeline for processing a number of SLR files, offering significant increases in productivity over simple drag-and-drop (GUI) program.

In the command line window type:

or use your favourite editor to examine the contents of the batch (or command) file 'viewslr.cmd'.

The comment lines in the file (preceded by #) give a brief description of the input arguments for FieldNotes viewslr utility - these should be familiar from the description above.

Batch files contain a series of commands which are executed sequentially, in the same way as in a command-prompt window. However they can also can reference arguments, read lists of input (for example filenames) and recognise a simple script language, allowing a reasonable degree of flexibility. The file 'viewslr.cmd' can be used as the basis for a semi-automated processing system simply by copying the relevant commands - the internet provides almost limitless examples of writing batch files.