# \[X\] Adding cover art fails if there is an apostrophe in the directory path name

**URL:** https://community.mp3tag.de/t/x-adding-cover-art-fails-if-there-is-an-apostrophe-in-the-directory-path-name/17317
**Category:** No Bugs
**Created:** [October 20, 2015, 6:32pm UTC](https://community.mp3tag.de/t/x-adding-cover-art-fails-if-there-is-an-apostrophe-in-the-directory-path-name/17317 "2015-10-20T18:32:25Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![DrTomBlinn](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/d/5fc32e/32.png) [@DrTomBlinn](https://community.mp3tag.de/u/DrTomBlinn)
#### Post date: [October 20, 2015, 6:32pm UTC](https://community.mp3tag.de/t/x-adding-cover-art-fails-if-there-is-an-apostrophe-in-the-directory-path-name/17317/1 "2015-10-20T18:32:25Z")

</div>

Windows 7 Pro with up to date patches.

I am using Audacity to convert vinyl LPs to MP3 for import into my iTunes library. I like to export into  
a directory named for the album, stored under the artist name, all in a directory that I use for my  
Audacity exports. So a typical path that contains the album contents might be:

H:\Audacity\Exports\Red Clay Ramblers\It Ain't Right

I like to put the album cover art in the same directory as a JPG file, usually named cover.jpg, and I  
use the quick action to add the album cover art. Mp3tag has no problem finding the JPG file in the  
directory where the MP3 files are located when I click on the "..." to the right of the path name box,  
and displays the images it finds, and if I double click on the cover.jpg, it comes up with the right  
path name:

H:\Audacity\Exports\Red Clay Ramblers\It Ain't Right\cover.jpg

but if I tell it to go ahead and apply the change by clicking on the "OK" button it pops up an error  
message window and reports the same error for every file:

Import cover from file "H:\Audacity\Exports\Red Clay Ramblers\It Ain't Right\cover.jpg" (Front Cover): File H:\Audacity\Exports\Red Clay Ramblers\It Ain't Right[SYNTAX ERROR IN FORMATTING STRING] cannot be accessed.

If I rename the directory in the path that has an apostrophe (usually the album name) so that it  
does not have an apostrophe, all is good.

As far as I can tell, neither Windows (nor Audacity) has any problems with the path names where  
some of the directory names contain an apostrophe. Windows (and Audacity) does have rules, and  
some special characters are disallowed, but the apostrophe isn't supposed to be in that list.

I have a workaround so it's not an urgent problem, but a fix would be a nice thing.

I can do screen shots if you need them, but the message displayed is in nice plain text.

I did check for any earlier error report with a search for "cover art" and didn't see anything.

DrTom in NH

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [October 20, 2015, 6:37pm UTC](https://community.mp3tag.de/t/x-adding-cover-art-fails-if-there-is-an-apostrophe-in-the-directory-path-name/17317/2 "2015-10-20T18:37:44Z")

</div>

Have a look at this thread  
[/t/17130/1](https://community.mp3tag.de/t/17130/1)

Even though it turns out in the end that the access rights were the problem, DetlevD shows a solution about the apostrophe in the path. Perhaps that helps.

---

<div class="post-metadata">

### Author: ![DrTomBlinn](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/d/5fc32e/32.png) [@DrTomBlinn](https://community.mp3tag.de/u/DrTomBlinn)
#### Post date: [October 20, 2015, 6:54pm UTC](https://community.mp3tag.de/t/x-adding-cover-art-fails-if-there-is-an-apostrophe-in-the-directory-path-name/17317/3 "2015-10-20T18:54:29Z")

</div>

If I were typing in the path name, then I suppose I might be willing to learn to double-type  
any apostrophe in the path name. But I didn't type it in, Mp3tag filled it in for me, and then  
was unable to use what it filled in. That, in my opinion, is the bug. The fix may well be to  
have the software scan through what it retrieved as the path to the JPG that's supposed to  
be used for cover art and make it compatible with whatever lower-level routines need to be  
able to parse it. Or perhaps there's a version of the lower-level routines that understands  
that a single apostrophe is a perfectly valid character in a Windows file name path.

---

<div class="post-metadata">

### Author: ![DetlevD](https://community.mp3tag.de/user_avatar/community.mp3tag.de/detlevd/32/123_2.png) [@DetlevD](https://community.mp3tag.de/u/DetlevD)
#### Post date: [October 20, 2015, 7:52pm UTC](https://community.mp3tag.de/t/x-adding-cover-art-fails-if-there-is-an-apostrophe-in-the-directory-path-name/17317/4 "2015-10-20T19:52:18Z")

</div>

> [@DrTomBlinn](#):
>
> If I were typing in the path name, then I suppose I might be willing to learn to double-type any apostrophe in the path name. But I didn't type it in, Mp3tag filled it in for me, and then was unable to use what it filled in. That, in my opinion, is the bug. ...

There is no bug. Within the action "Import cover from file" Mp3tag supports the so called "format string", in order to provide scripting for the image filename (... look at the title of the edit field).  
Therefore the Mp3tag Scripting Language needs some special characters to be escaped.  
See also ...  
[/t/15384/1](https://community.mp3tag.de/t/15384/1)  
[How to save images as album arts according to audio filenames](https://community.mp3tag.de/t/15707/2)

DD.20151020.2352.CEST

---

<div class="post-metadata">

### Author: ![Florian](https://community.mp3tag.de/user_avatar/community.mp3tag.de/florian/32/5759_2.png) [@Florian](https://community.mp3tag.de/u/Florian)
#### Post date: [December 28, 2018, 2:37pm UTC](https://community.mp3tag.de/t/x-adding-cover-art-fails-if-there-is-an-apostrophe-in-the-directory-path-name/17317/5 "2018-12-28T14:37:24Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
