# Column: MP3 CoverArt Yes/No + 2 extract commands

**URL:** <https://resource.dopus.com/t/column-mp3-coverart-yes-no-2-extract-commands/18833>\
**Category:** Buttons/Scripts\
**Tags:** script, commands, column, perl\
**Created:** [July 27, 2014, 1:56pm UTC](https://resource.dopus.com/t/column-mp3-coverart-yes-no-2-extract-commands/18833 "2014-07-27T13:56:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![myarmor](https://resource.dopus.com/user_avatar/resource.dopus.com/myarmor/32/35118_2.png) [@myarmor](https://resource.dopus.com/u/myarmor)\
**Post date:** [July 27, 2014, 1:56pm UTC](https://resource.dopus.com/t/column-mp3-coverart-yes-no-2-extract-commands/18833/1 "2014-07-27T13:56:27Z")

</div>

(See Also: ["Extract Cover Art" column and command](http://resource.dopus.com/viewtopic.php?f=35&t=22700))

### Requirements:

- Directory Opus **11.5.2** or above.
- **ActivePerl 5.20.2.2001** or above installed and enabled for scripting.
- The **MP3-Tag** Perl package.  
If you upgrade ActivePerl, make sure the package exists (is compatible with) for the new version.

Unlike JScript and VBScript, Perl scripting is not supported in Windows out of the box. You must install ActivePerl and the required package for this script to work. This post explains in more detail:

> [@How To: Setup ActivePerl for scripting in Opus](https://resource.dopus.com/t/scripts-perl-how-to-setup-activeperl-for-scripting-in-opus-11/18832/1):
>
> Getting ActivePerl Get ActivePerl 5.20.2.2001 or higher from [Here](http://www.activestate.com/activeperl/downloads) Select Win32/Win64 Windows Installer (MSI) package depending on your DOpus install. Enabling ActivePerl for DOpus scripting Install ActivePerl 5.20.2.2001 or higher. Extract the a…

### Overview:

This script adds a _CoverArt YES/NO_ column, and the commands `ExtractTagImage` and `ExtractTagImages`.

The scripts seems to work properly on my computer, but no guarantees are given.

### Commands:

**ExtractTagImage**

```plaintext
ExtractTagImage INFILE=<infullpath> OUTFILE=<outfullpath> AUTOEXT

```

- Extracts the first available coverart from `<infullpath>` and saves it into the file `<outfullpath>`.
- Output filename must be specified with an extension.

`AUTOEXT` is optional. If it is specified, the script attempts to correct the file extension for the output filename. In other words, if you name the output file `test.jpg`, but the mime-type says it is a `.png` then the script writes to the file `test.png`.

**ExtractTagImages**

```plaintext
ExtractTagImages OUTPATH=<outputpath> AUTOEXT

```

- Extracts the first available coverart in each file from selected files.

`OUTPATH` is optional. If not specified the it outputs the files into the same folder as the files.

`AUTOEXT` is optional. If it is is specified, the script attempts to correct the file extension for the output file. Default is `.jpg`.

Note: The script don't seem to handle "special" characters such as japanese.

### Download:

- [ExtractTagImagesCol.pl.txt](https://resource.dopus.com/uploads/short-url/ne0QhzGwzlT42Cbo4DJx4NZudVN.txt) (6.5 KB)
- Download the file, then drag it to the list under **Preferences / Toolbars / Scripts**.
- Remember that, unlike most scripts, this requires ActivePerl to be installed. See above for details.

### History:

- Updated recommended version
- Added note about upgrading ActivePerl because MP3-Tag 1.13 is currently not compatible with 5.22.0.2220.

---

<div class="post-metadata">

**Author:** ![MrC](https://resource.dopus.com/letter_avatar_proxy/v4/letter/m/43a26b/32.png) [@MrC](https://resource.dopus.com/u/MrC)\
**Post date:** [July 27, 2014, 3:53pm UTC](https://resource.dopus.com/t/column-mp3-coverart-yes-no-2-extract-commands/18833/2 "2014-07-27T15:53:29Z")

</div>

FYI: To install packages, such as MP3-Tag, you can also accomplish it in the Windows command shell directly:

```auto
ppm install MP3-Tag
```
