# File xxx cannot be opened for writing

**URL:** https://community.mp3tag.de/t/file-xxx-cannot-be-opened-for-writing/54063
**Category:** Support
**Created:** [August 13, 2021, 1:45pm UTC](https://community.mp3tag.de/t/file-xxx-cannot-be-opened-for-writing/54063 "2021-08-13T13:45:25Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![donwiss](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/d/e0b2c6/32.png) [@donwiss](https://community.mp3tag.de/u/donwiss)
#### Post date: [August 13, 2021, 1:45pm UTC](https://community.mp3tag.de/t/file-xxx-cannot-be-opened-for-writing/54063/1 "2021-08-13T13:45:25Z")

</div>

I am getting this error on many FLAC files. But both Tag&Rename and VLC can edit the tags, and their saving the tag then makes the tag editable in Mp3tag. Mp3tag should be as tolerant of whatever this error is as the other programs.

---

<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: [August 13, 2021, 1:50pm UTC](https://community.mp3tag.de/t/file-xxx-cannot-be-opened-for-writing/54063/2 "2021-08-13T13:50:06Z")

</div>

Can you provide an example file so that I can investigate this issue?

---

<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: [August 13, 2021, 5:57pm UTC](https://community.mp3tag.de/t/file-xxx-cannot-be-opened-for-writing/54063/3 "2021-08-13T17:57:47Z")

</div>

Thanks for the example file. It's a corrupted file in the sense that the first `PICTURE` block appears in front of the `STREAMINFO` block as block #0.

The [FLAC Format specification](https://xiph.org/flac/format.html#format_overview) states, that

> **STREAMINFO** : This block has information about the whole stream, like sample rate, number of channels, total number of samples, etc. **It must be present as the first metadata block in the stream**. Other metadata blocks may follow, and ones that the decoder doesn't understand, it will skip.

I'm not sure about where to proceed from here. Just wanted to note, that it's not a bug in Mp3tag, but a corrupt file it refuses to write.

Unless I implement a workaround for each and every issue that I encounter, not writing to a file that doesn't conform to the assumed structure still seems like a safe bet to prevent even more damage.

---

<div class="post-metadata">

### Author: ![donwiss](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/d/e0b2c6/32.png) [@donwiss](https://community.mp3tag.de/u/donwiss)
#### Post date: [August 13, 2021, 6:50pm UTC](https://community.mp3tag.de/t/file-xxx-cannot-be-opened-for-writing/54063/4 "2021-08-13T18:50:51Z")

</div>

Well, as noted, other packages are able to handle this. Poikosoft's Easy CD-DA Extractor was creating these bad files for years. And not fixing it, means more posts here about this.

I can fix with Tag&Rename, but how to find them? Can I write a filter? Or, for my own header searching, what string is not supposed to be after the other? Easy to look for strings and compare location in the header.

When I have a bad file in Mp3tag, I can see the path when I look at the properties, but I haven't found a way to put the path into the clipboard, so to paste into the address field of Tag&Rename. And fix.

---

<div class="post-metadata">

### Author: ![ryerman](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ryerman/32/5285_2.png) [@ryerman](https://community.mp3tag.de/u/ryerman)
#### Post date: [August 13, 2021, 9:51pm UTC](https://community.mp3tag.de/t/file-xxx-cannot-be-opened-for-writing/54063/5 "2021-08-13T21:51:29Z")

</div>

> [@donwiss](#):
>
> but I haven't found a way to put the path into the clipboard

Try a user-defined tool, like this:  
Path: `C:\Windows\System32\cmd.exe`  
Parameter:` /c echo "%_path%" | clip`

> [@User-defined Tools](https://community.mp3tag.de/t/user-defined-tools/966):
>
> [General information](https://community.mp3tag.de/t/tools/966/2) on user-defined Tools in Mp3tag Examples [Open files in Windows Explorer](https://community.mp3tag.de/t/tools/966/3)[Play/Enqueue files in Winamp](https://community.mp3tag.de/t/tools/966/4)[Web Browser](https://community.mp3tag.de/t/tools/966/5)[Folder Navigation](https://community.mp3tag.de/t/tools/966/6)[Re-encode WAV using ffmpeg](https://community.mp3tag.de/t/tools/966/7)

---

<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: [November 4, 2024, 4:52pm UTC](https://community.mp3tag.de/t/file-xxx-cannot-be-opened-for-writing/54063/6 "2024-11-04T16:52:53Z")

</div>

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