How to prevent macOS from thinking a folder is a file

file extensionsfinderfolders

I am usually copy/pasting the name of the projects my team works on into a folder's name, so that they match.
This allows me to be organized and fast, and to find folders that match project names easily.

However, it doesn't always work, since some project names will have words and some won't.

For example the project that ends in "-lists" was named without an error message, but the second one gave me an error message:

enter image description here

Now, I need the names of the folders to be as close to project names. Which can contain dots. This way, I can copy the folder name to search the database and find the corresponding project.

But I cannot manually change every single . into a -, I feel like this would be a lot of trouble.

Should I add the word "folder" at the end to make sure macOS doesn't think my folders have file extensions?

When does a folder's name turn this folder into a file I won't be able to open anymore, and what are ways to name folders freely, without the system assuming they are extensions?

Best Answer

It’s thinking it has an extension because you’re giving it an extension.

Anytime you end something with a .whatever you're giving it an extension. This is a convention across all operating systems and not limited to macOS.

Instead of using dots as a separator for dates, use a dash or an underscore. You don’t need to do this for all folders all at once, but with a little bash scripting magic and using a utility like sed or awk the renaming of the files/folders can be done automagically.