Author Topic: Adding Folders That End In .M  (Read 2672 times)

ddripper

  • Newbie
  • *
  • Posts: 2
I tried to add a folder called R.E.M into Musicbee and I get:

System.UnauthorizedAccessException: Access is denied. [D:\Music\R.E.M]

Through trial and error I discovered that the error only seems to occur in folders that end in .M that you try to directly add. If you add the previous folder (ie. D:\Music) or a later folder (ie. D:\Music\R.E.M\Monster) the error doesn't occur.

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34312
I am unable to reproduce this and there is no special treatment for folders ending with .M

psychoadept

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 10691
Is it possible  your computer thinks .M is a file extension?  Does changing the folder name to REM solve the problem? What if you change it to a different last letter?
Last Edit: January 19, 2020, 05:55:09 PM by psychoadept
MusicBee Wiki
Use & improve MusicBee's documentation!

Latest beta patch (3.5)
(Unzip and overwrite existing program files)

hiccup

  • Sr. Member
  • ****
  • Posts: 7785
Maybe there is some caching of a previous, similar named/re-named or moved folder in play here?
Does rebooting Windows and restarting MB solve it?

phred

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 9303
In your original post you say you're entering "R.E.M"
Is that the band? If so, it's name is "R.E.M." (Note the period  -after- the M)
Just for the hell of it, try creating a directory with the three periods.
Download the latest MusicBee v3.5 or 3.6 patch from here.
Unzip into your MusicBee directory and overwrite existing files.

----------
The FAQ
The Wiki
Posting screenshots is here
Searching the forum with Google is  here

hiccup

  • Sr. Member
  • ****
  • Posts: 7785
Just for the hell of it, try creating a directory with the three periods.

That would indeed be the most obvious thing to do.
Yet, I don't think Windows allows a folder name to end with a punctuation.
I have no idea why, and the documentation on it is probably also not that easy to find.

But this could well be a smart thought and an important clue to what the OP did and why it is not working?

phred

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 9303
Yet, I don't think Windows allows a folder name to end with a punctuation.
Interesting. I created a directory R.E.M and then attempted to create another directory R.E.M.
and got this warning. Which is rather odd since the two directories are not named the same. But apparently Windows, in its mysterious ways, won't allow the dot at the end.

And further confirmed that when I tried to add the dot at the end of the existing R.E.M and when I hit <enter> it was still R.E.M but with no warning. But when I attempted to rename R.E.M as R.E.M? I got what I expected.

I don't see any periods in that warning, do you?
Download the latest MusicBee v3.5 or 3.6 patch from here.
Unzip into your MusicBee directory and overwrite existing files.

----------
The FAQ
The Wiki
Posting screenshots is here
Searching the forum with Google is  here

hiccup

  • Sr. Member
  • ****
  • Posts: 7785
Windows won't allow me to create a folder ending with a punctuation.
But I see that MusicBee will allow it.

Perhaps the problem lies there somehow?

Zak

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 2450
Looks like you have this sussed, but Windows won't allow you to create a file or folder name that ends with a period.

Quote
Do not end a file or directory name with a space or a period. Although the underlying file system may support such names, the Windows shell and user interface does not. However, it is acceptable to specify a period as the first character of a name. For example, ".temp".

From:
https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file?redirectedfrom=MSDN#naming-conventions

So you probably weren't trying to create a folder called "R.E.M", but "R.E.M.".

If you try in Windows Explorer it will create the file/folder and just silently remove the period. I'm not sure how MusicBee handles it if you try to create a file naming template with that artist name in it, but it's possible creating folders via an API call would handle it less gracefully.

As to why this is the case, it's safe to assume it's left over from the good ol' DOS days with its 8.3 naming conventions. The period indicated the end of the file name and the start of the extension (i.e. the file type). A lot of programs still rely on that extension to know what to do with a file, so a trailing period would leave you with a confusing kind of anonymous file.

Another anachronism is that you still can't name a file any of CON, PRN, AUX or NUL because they are - and always have been - reserved names for devices. The Microsoft article above includes a more complete list.


Windows won't allow me to create a folder ending with a punctuation.

You should be able to create files and folders ending with any punction besides those in Phred's screenshot - which can't appear anywhere within a name - or a period.
$ # % ^ etc. are all fair game.
Bee excellent to each other...

hiccup

  • Sr. Member
  • ****
  • Posts: 7785

hiccup

  • Sr. Member
  • ****
  • Posts: 7785
And this is trying to delete it after MusicBee somehow managed to create it:


Zak

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 2450
Interesting. I guess that's what they mean by "Although the underlying file system may support such names, the Windows shell and user interface does not."
If the results are dependent on the program trying to interact with the folder, it makes a good argument for avoiding those folder names. Don't want to come back to it three months later and find your music has disappeared.  :-X
Bee excellent to each other...

hiccup

  • Sr. Member
  • ****
  • Posts: 7785
Interesting. I guess that's what they mean by "Although the underlying file system may support such names, the Windows shell and user interface does not."

Could be.
Since MusicBee is Windows-only software, I think it would be good if MB would not be able to create folders ending with a punctuation.
Obviously that creates a serious problem.

ddripper

  • Newbie
  • *
  • Posts: 2
A number of people made good suggestions, and I will try to address them all.

If the folder ends with .A .M .P .W or .X the folder refuses to add with drag/drop, all other letters are fine.

I tried moving the folder to the root directory and also tried moving the folder to C: just in case it was a problem with the path, and when I tried todrag/drop the R.E.M folder into my music library I still get the same error.

If I rename it to REM as suggested, the folder add fine, which indicates that it's an issue with the folder name, not the folder itself.

I also checked my Windows Settings and the extension .M is not associated with any program.

I also tried renaming my Jimmy Barnes folder to Jimmy Barnes.M and adding to my music folder and it causes the same error.

Just in case there was a problem with my copy of MusicBee (corrupted settings or library files causing the problem,) I just finished uninstalling MusicBee, deleting the library files and reinstalling it, and when I drag/drop the R.E.M folder into my MusicBee Music Library, I get the same error:

MusicBee v3.3.7310.31925D  (Win10.0), 22 Jan 2020 7:28:

System.UnauthorizedAccessException: Access is denied. [D:\Music\R.E.M]
   at #=zCf4VQ_fbhtH95rz2gNmFAbQ=.#=zQpNJpAzXUl5a.#=zu5xWrFY=.#=zgLNDeXw9Itw0(#=zlkE2wlw28gwaYlXF4g== #=zXJ5hmWc=, FileShare #=zCILa2$Q=, FileOptions #=zRbT7IJA=, Boolean #=zmFaAsvwdppoG)
   at #=zs$v0QJMGgz_3qcC8MBYx$3TbhWLM.#=zgLNDeXw9Itw0(#=zlkE2wlw28gwaYlXF4g== #=zXJ5hmWc=, FileOptions #=zRbT7IJA=)
   at #=zZZwzh3uXkPVnA4Lk5hhVhMs=.#=zgLNDeXw9Itw0(#=zlkE2wlw28gwaYlXF4g== #=zXJ5hmWc=, FileOptions #=zRbT7IJA=)
   at #=z2UFdtdloStNYpwV6JA_AIIc=.#=z9wapuoBZRDyQ(#=zfSkwXAQ= #=zw$5Jazo=)
   at #=z2UFdtdloStNYpwV6JA_AIIc=.#=zfJ0pBtI=()
   at #=zcSUiT7FfjPAJ1lCP26kaFcE=.#=qsQHnGzY8$r7D68J7errB$kayMjbufN5$UAwktucMwWE=._Lambda$__0()

KangNi

  • Full Member
  • ***
  • Posts: 175
Hi there,

And this is trying to delete it after MusicBee somehow managed to create it:



Once I had this problem by myself and spend a very very long time to find a solution to get rid of such folders - so here it is ...

Using the following command on a command prompt (admin may be necessary) to delete folders ending with a dot :

      rd "\\?\drive:\folder\folder_ending_with_a_dot." /S /Q

Maybe renaming is possible in a similar way, but I've never tested it.

I hope that helps.

Greetings
Last Edit: February 12, 2020, 10:34:26 PM by KangNi