# "File Cannot Be Opened For Writing"

**URL:** https://community.mp3tag.de/t/file-cannot-be-opened-for-writing/12416
**Category:** Support
**Created:** [August 21, 2011, 1:34pm UTC](https://community.mp3tag.de/t/file-cannot-be-opened-for-writing/12416 "2011-08-21T13:34:34Z")
**Posts on this page:** 1
**Showing post:** 29

<div class="post-metadata">

### Author: ![gstalnaker](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/g/aca169/32.png) [@gstalnaker](https://community.mp3tag.de/u/gstalnaker)
#### Post date: [March 8, 2021, 7:54pm UTC](https://community.mp3tag.de/t/file-cannot-be-opened-for-writing/12416/29 "2021-03-08T19:54:15Z")

</div>

Thinking that other folks may encounter this -- yet another variant on "locked for writing" that has NOTHING to do with mp3 file integrity, disallowed characters in a tag, or file permissions -- PATH LENGTH. I've encountered the dreaded "file locked" error multiple times.

Following advice here: [How to check files for errors?](https://community.mp3tag.de/t/how-to-check-files-for-errors/44633) I tried checking the mp3 files with both foobar2000 and mp3diags. Nothing doing, mp3tag still said the file was locked.

I then modified the mp3 file itself by:

- Converting to WAV
- Run ClickRepair on WAV, saved to -cr.wav
- Convert to Flac (to avoid second lossy mp3 file)

mp3tag STILL says file is locked. Whatever "it" is, it's not the audio file.

I bought some recordings of Wagner's Ring cycle from OperaDepot. He creates a folder structure like this:

AlbumName/OperaName/DiscID/DiscNumber/Files

with both AlbumName and OperaName including performers, e.g.,

Wagner - RotN - Böhm - Bayreuth - 1968/Die Götterdämmerung - Nilsson, Windgassen, Treptow, Stewart/10011/Die Götterdämmerung - 1/filename.mp3

That's a long filepath. On a hunch, I removed the OperaName/DiscID parts of that path by moving all of the DiscNumber folders up two levels.

mp3tag no longer says the files are locked!! The move shortened the filepath considerably. I thus conclude that filepath length was actually the issue and the "locked" error is itself erroneous. I think mp3tag is encountering a error condition it is not programmed to recognize, so in this case it's throwing the "locked" error which is misleading.

---

_[View the full topic](https://community.mp3tag.de/t/file-cannot-be-opened-for-writing/12416)._
