# Odd issue opening mp3tag via a command line

**URL:** https://community.mp3tag.de/t/odd-issue-opening-mp3tag-via-a-command-line/71025
**Category:** Support
**Created:** [April 8, 2026, 9:34pm UTC](https://community.mp3tag.de/t/odd-issue-opening-mp3tag-via-a-command-line/71025 "2026-04-08T21:34:57Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![godef](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/g/ec9cab/32.png) [@godef](https://community.mp3tag.de/u/godef)
#### Post date: [April 8, 2026, 9:34pm UTC](https://community.mp3tag.de/t/odd-issue-opening-mp3tag-via-a-command-line/71025/1 "2026-04-08T21:34:57Z")

</div>

I have an Access database for my music collection. A certain button, when focused on a single MP3 file, tries to open the file from it’s file location in mp3tag. I always get the popup message “File cannot be accessed.” But then when I click the OK button, mp3tag opens up with the file as expected. I’m living with this, but it’s a nuisance.

Here is the VBA command to open the file (Quote is a custom routine to put quotes around a string):

```auto
Shell "C:\Program Files\Mp3tag\Mp3tag.exe /fn: " & Quote(Me.txtFilePath, tqDoubleQuote), vbMaximizedFocus

```

Here is what the command looks like after substitution for a specific file:

Shell "C:\Program Files\Mp3tag\Mp3tag.exe /fn: F:\Android3\Indie\1980s\Indie 1984\U2 ~ Bad.mp3", vbMaximizedFocus

Any ideas?

---

<div class="post-metadata">

### Author: ![LyricsLover](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/c6cbf5/32.png) [@LyricsLover](https://community.mp3tag.de/u/LyricsLover)
#### Post date: [April 8, 2026, 10:03pm UTC](https://community.mp3tag.de/t/odd-issue-opening-mp3tag-via-a-command-line/71025/2 "2026-04-08T22:03:45Z")

</div>

According to the [documentation](https://docs.mp3tag.de/command-line/#start-with-file), a single file should be called this way:

> ## Start with file
> 
> `Mp3tag.exe /fn:"<full-qualified file name>"`

Please double check if your _Quote_ custome routine really adds the **quotation marks** (aka **double quotes** ) around the full-qualified file name as shown in the documentation.

I can not test it, but in VBA it should look like this:  
`Shell """C:\Program Files\Mp3tag\Mp3tag.exe"" /fn:""F:\Android3\Indie\1980s\Indie 1984\U2 ~ Bad.mp3""", vbMaximizedFocus`

---

<div class="post-metadata">

### Author: ![godef](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/g/ec9cab/32.png) [@godef](https://community.mp3tag.de/u/godef)
#### Post date: [April 9, 2026, 8:11pm UTC](https://community.mp3tag.de/t/odd-issue-opening-mp3tag-via-a-command-line/71025/5 "2026-04-09T20:11:41Z")

</div>

The Quote function you see in the VBA code handles this; I wrote it to avoid dealing with setting up quotes properly when I’m constructing strings command fragments. The second snippet of code shows the actual resulting shell command.

---

<div class="post-metadata">

### Author: ![godef](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/g/ec9cab/32.png) [@godef](https://community.mp3tag.de/u/godef)
#### Post date: [April 9, 2026, 8:12pm UTC](https://community.mp3tag.de/t/odd-issue-opening-mp3tag-via-a-command-line/71025/6 "2026-04-09T20:12:49Z")

</div>

That’s correct, I do believe this is an mp3tag issue. The error I get is from mp3tag, not Access.

---

<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: [April 9, 2026, 8:32pm UTC](https://community.mp3tag.de/t/odd-issue-opening-mp3tag-via-a-command-line/71025/7 "2026-04-09T20:32:47Z")

</div>

> [@godef](#):
>
> Shell "C:\Program Files\Mp3tag\Mp3tag.exe /fn: F:\Android3\Indie\1980s\Indie 1984\U2 ~ Bad.mp3", vbMaximizedFocus

Has considerably fewer quotation marks than

> [@LyricsLover](#):
>
> Shell """C:\Program Files\Mp3tag\Mp3tag.exe"" /fn:""F:\Android3\Indie\1980s\Indie 1984\U2 ~ Bad.mp3""", vbMaximizedFocus

I think that the filename wih spaces has to be enclosed in quotation marks.

---

<div class="post-metadata">

### Author: ![godef](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/g/ec9cab/32.png) [@godef](https://community.mp3tag.de/u/godef)
#### Post date: [April 9, 2026, 9:14pm UTC](https://community.mp3tag.de/t/odd-issue-opening-mp3tag-via-a-command-line/71025/8 "2026-04-09T21:14:05Z")

</div>

When building the exec command in the code, you need the extra quotes, pairs of which then cancel out to single double-quotes, which is then passed to the shell command. The first code snippet is my actual VBA code; in it there is a Quote function which handles all the double double-quotes needed which pair down to the single double-quotes passed along to shell, which I show in the second code snipped.

For shits and giggles, I stepped through my code in debug mode, and then manually edited the resulting shell command after adding in all the double or triple double-quotes. I got the same results. And again, the command _does_ work, but only after first getting “File cannot be accessed” message from mp3tag. So it seems to be an issue with how I’m using mp3tag’s command line, as if I’m missing an option.

---

<div class="post-metadata">

### Author: ![godef](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/g/ec9cab/32.png) [@godef](https://community.mp3tag.de/u/godef)
#### Post date: [April 9, 2026, 9:41pm UTC](https://community.mp3tag.de/t/odd-issue-opening-mp3tag-via-a-command-line/71025/9 "2026-04-09T21:41:02Z")

</div>

FIXED!

In re-examining the syntax, I realized I had a space between the /fn: option and the filename. I took this out and the problem went away. Not sure why it worked as expected after getting the “File cannot be accessed” message, but I don’t get it anymore after removing the space.

---

<div class="post-metadata">

### Author: ![system](https://community.mp3tag.de/uploads/default/original/2X/c/ce7035d426cb755a7916793326d23b465222a407.png) [@system](https://community.mp3tag.de/u/system)
#### Post date: [April 16, 2026, 10:05pm UTC](https://community.mp3tag.de/t/odd-issue-opening-mp3tag-via-a-command-line/71025/11 "2026-04-16T22:05:37Z")

</div>

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