Red Rocks, Colorado

Playlist Export Command Line Parameters

Playlist Export supports a variety of command line parameters to modify the playlist creation process. This page outlines the available parameters.

Help/Usage

You can view the built-in help text (usage guide) by using the -h or -? parameters.

PlaylistExportConsole -h
Library Location

Playlist Export attempts to load your iTunes library from its default location. (~/Music/iTunes/iTunes Music Library.xml). You can override this default behaviour by specifying a specific location.

PlaylistExportConsole --library "/alternate/path/to/iTunes Music Library.xml"

or

PlaylistExportConsole -l "/alternate/path/to/iTunes\ Music\ Library.xml

If there are spaces in the path, the entire path must be surrounded with quotation marks (as in the first example) or by escaping the spaces with a \ (as in the second example).

Output Directory

By default Playlist Export will write the generated and copied files into the current directory. You can change this location using the –output-dir parameter.

PlaylistExportConsole --output-dir /tmp/playlists

or

PlaylistExportConsole -o /tmp/playlists

As with the Library Location, a path that contains spaces must be surrounded with qutotation marks (“) or have the spaces escapted with \ (/my/path\ with\ spaces)

Playlist Type

Playlist Export can export playlists in multiple formats. The default format is M3U, but the following options are acceptable:

PlaylistExportConsole --playlist-type M3U8

or

PlaylistExportConsole -t WPL
Included Playlists

Playlist Export will export all playlists defined in iTunes. To specify only specific playlists to export, use the include-playlist parameter. This parameter can be speicfied multiple times to include multiple playlists.

PlaylistExportConsole --include-playlist Playlist1

or

PlaylistExportConsole -i Playlist1

Multiple parameters can be specified as well.

PlaylistExportConsole -i Playlist1 -i "Playlist 2" -i Playlist3

As shown above, playlists with spaces in the name must be enclosed with quotes (“).

This parameter cannot be combined with Exclude Playlists.

Excluded Playlists

Playlist Export will export all playlists defined in iTunes. To exort all playlists except a few, use the exclude-playlist parameter. This parameter can be speicfied multiple times to exclude multiple playlists.

PlaylistExportConsole --exclude-playlist Playlist1

or

PlaylistExportConsole -e Playlist1

Multiple parameters can be specified as well.

PlaylistExportConsole -e Playlist1 -i "Playlist 2" -i Playlist3

As shown above, playlists with spaces in the name must be enclosed with quotes (“).

This parameter cannot be combined with Include Playlists.

Exclude Disabled Tracks

Playlist Export will export all tracks in a playlist. To exclude tracks that have been disabled (unchecked) in iTunes, add the exclude-disabled parameter.

PlaylistExportConsole --exclude-disabled

or

PlaylistExportConsole -d
Exclude Predefined Tracks

iTunes includes several ‘built in’ playlists, including ‘Music’, ‘Library’, ‘TV Shows’, etc. This option will exclude all built in options. This can be combined with the Exclude Playlists option as well. To exclude predefined playlists, add the exclude-predefined parameter.

PlaylistExportConsole --exclude-predefined
Include Tracks with an Extension

If the device you are using to consume the playlists only supports some of the file types that you have in your playlists, you can use this option to include only the tracks of a certain type. IE ‘mp3’, ‘wav’, ‘aac’, etc. This option can be specified multiple times to include multiple file types. To include a specific track types, add the include-extension parameter.

PlaylistExportConsole --include-extension mp3
Exclude Tracks with an Extension

If the device you are using to consume the playlists only supports some of the file types that you have in your playlists, you can use this option to exclude the tracks of a certain type. IE ‘mp3’, ‘wav’, ‘aac’, etc. This option can be specified multiple times to exclude multiple file types. To exclude a specific track types, add the exclude-extension parameter.

PlaylistExportConsole --exclude-extension mp3
Change the output Path Prefix

This option behaves differently using the Copy Track type NONE (default) than other types. When using NONE, the value of this parameter will be used to replace the default path to your music files, called the MusicPath in iTunes. If iTunes is not configured to automaticlly organize your music, this option may not work well. When used with other Copy Track options, the value of this parameter is prepended to the path in the output playlist. This can be useful if you want to specify an absolute path to your tracks for an external device. To specify the path prefix use the path-prefix parameter.

PlaylistExportConsole --path-prefix /new/path/to/your/music/

or

PlaylistExportConsole -p /new/path/to/your/music/
Replace Path

This parameter is a generic tool to modify the paths in the output playlist. This allows you to change all occurances of a given string to another string (or remove it). This can be useful as an alternative to the Path Prefix parameter when iTunes is not orgaizing your music, or whenver you need to modify the output path. The value of the parameter is two string seperated by the ^ character (Shift-6 on many keyboards). Ex. /old/path^/new/path. To simply remove part of the path you can leave the new part blank, ex. /old/path^

PlaylistExportConsole --replace-path old^new

or

PlaylistExportConsole -r old^new
Copy Music Files

Playlist Export can be used to copy the music being exported as well. This can be done directly to the target device, or to an intermediate folder as needed. There are several different ways to copy the music:

PlaylistExportConsole --copy FLAT

or

PlaylistExportConsole -c PLAYLIST
UTF-8 BOM

A UTF-8 Byte Order Mark can be included at the begining of a file. However, for UTF-8 it is not reccomended as it provides no value. (http://en.wikipedia.org/wiki/Byte_order_mark#UTF-8). Be default, Playlist Export does not include a BOM. However, you can have Playlist Export include one using the –include-bom parameter.

PlaylistExportConsole --include-bom

or

PlaylistExportConsole -b
Exclude Header

Playlist Export addes a comment line to the begining of every exported M3U file. While this conforms to the specification, some applciations may have problems reading this files. In this case, you can use this parameter to omit the header.

PlaylistExportConsole --no-header
Extension

Each playlist type has a default file extension it uses (.m3u, .wpl, etc). This extension can be overridden if you prefer to use a different extension.

PlaylistExportConsole --extension myext

or

PlaylistExportConsole -x myext

When specifying a custom extension, do not include a leading period.

Windows Paths

If the exported playlist will be consumed by a device that uses Windows style paths (\ path separator instead of /), use this option. The paths in the output playlist will use the \ path separator.

PlaylistExportConsole --windows-paths
Replace All Spaces

If the exported playlist will be consumed by a device or program that has problems handling paths with spaces, you can use this parameter to replace all the spaces in the exported playlists with another character. The _ character is the reccomended option.

PlaylistExportConsole --replace-spaces _