LOF Files

A LOF file can be used to Import or Open a set of audio files into Audacity.

  • A LOF file is a plain text file ending with the extension ".lof" that contains a list of audio files to import into an Audacity project window.
  • It can optionally contain commands to create new project windows into which to import the audio files.

Use

To use LOF files in Audacity use either of:

Then select List of files in basic text format from the Files of type dropdown list:

: Selecting a LOF file for Import.png

Command syntax

There are only two commands "file" and "window", each with associated options:

file (required)

Specifies the full path to the file which then imports as a new track in the current window (the path must always be in double quotes). There is one optional parameter:

  • offset: specifies the start time of the audio file in seconds

window (optional)

Creates a new Audacity project window for subsequent files in the list, There are two optional parameters:

  • offset: specifies the left-most time, in seconds, displayed in the window
  • duration: specifies how much time, in seconds, should be displayed in the window

Comments

The hash character # can be used anywhere on a line to precede a comment - everything after # on that line is ignored by the importer.

| Tip | Tips: - Each command must be placed on a separate line. - Files are imported in the order shown in the LOF file. - If the file to be imported is in the same folder as the LOF file, you need only give the file name inside double quotes. |

Example

Given an empty project window, the following LOF file located at C:\Desktop imports the audio file "sample1.wav" from the Desktop into that window, followed by "sample2.wav" and "sample3.wav" from other locations underneath. Then a new project window is created and the audio file "sample4.wav" from the Desktop is imported into it.

# everything following the hash character is ignored
window # an initial window command is implicit and optional
file "sample1.wav"                   # sample1.wav is displayed
file "C:\Ken\sample2.wav" offset 5   # sample2.wav is displayed with a 5s offset
file "C:\Dave\sample3.wav"           # sample3.wav is displayed with no offset
window offset 5 duration 10          # open a new window, then zoom to display
# 10 seconds of sample4.wav from 5 seconds to 15 seconds, offsetting it by 2.5 seconds
file "sample4.wav" offset 2.5

The file names shown are for a Windows system, but the same syntax applies on Mac and Linux with the obvious change to a suitable file path.