Can't use folder with blank space at the end in Windows.

Everything related to MakeMKV
Post Reply
snultanen
Posts: 1
Joined: Tue Jul 13, 2021 5:48 pm

Can't use folder with blank space at the end in Windows.

Post by snultanen »

So I've discovered what is really a Windows issue rather than a MakeMKV issue. I get my filenames from Imdb and when I copy/paste there is a space after the year parentheses. I usually remove it but the human factor is real with me also... If I don't remove the space at the end of the "Output folder" field in MakeMKV Windows 10 will not be able to use the file. Windows produces the following error: (translated from Swedish) "The catalogue name is erroneous". The only way I've been able to remove the folder is to format the whole drive. This is not a mayor issue for me since I mostly use the HDD as a intermediate for .mkv-files but others may not be so lucky.

The easy fix I would guess is to put a trim function to remove whitespaces from the folder name. Just for the sake of testing I also tried to put a space at the start of the folder name. There was a Windows issue with renaming if I didn't add another char in the name but that is a easier fix than formatting the whole drive due to trailing spaces.
Woodstock
Posts: 9937
Joined: Sun Jul 24, 2011 11:21 pm

Re: Can't use folder with blank space at the end in Windows.

Post by Woodstock »

It's not just spaces at the END. The main issue is that a space at the end IS a valid character, but Explorer cannot deal with it. It always trims the name, even when it knows it shouldn't.

You can fix the folder or file name at a command prompt by putting the name in quotes, including the space. This works:

Code: Select all

rename "My Folder With a Spacey Name " "My Folder Without a Space"
If you are using CMD.EXE, it will even fill in the space and quotes if you type <tab> after "rename my".
MakeMKV Frequently Asked Questions
How to aid in finding the answer to your problem: Activating Debug Logging
Post Reply