0

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?

  • Adding the extension .15 doesn't change the folder into a "file" for me. What application does it try to open when you open the "file"? It's possible that some app has registered a bundle with the extension .15. – At0mic May 5 at 23:32
  • 1
    I feel like the creation date of the folder or file would be enough to justify not adding the full date in the filename in the first place. You can, by the way, set the creation date after the file has been created and set it in the past or the future using SetFile. That said, it takes a some effort to set up a script or something so you could do it easily. There might be a 3rd party thing (app?) for that. Path Finder does let you change it in the attributes panel. It's well hidden though. – Joonas May 6 at 8:17
  • 1
    That suggestion aside, I don't think there would be any objections naming an Alias that way. So a workaround could be to name the folder whatever and make an alias next to it (or wherever) and give it the filename with the date separated by . – Joonas May 6 at 8:18
  • 1
    I can't think of a specific scenario where this naming scheme for a folder would be problematic, but the "...folder may appear as a single file" warning is just that there could be scenarios where it's seen as a file instead of a folder. It's not like you're going to open Finder one day and you can't see them as folders anymore (Unless an OS update changes that). The likely scenario would be like a script or a third party application preventing you from opening the folder as a folder, because it sees it as a single file, because folders don't tend to have extensions...or something similar. – Joonas May 6 at 9:28
  • 1
    I'm simply suggesting solutions based on the incomplete information you gave us. Given this new info, you should probably go with my last tangent and ignore the dialog. Use Path Finder (or maybe something else) if you never want to see the warning. – Joonas May 6 at 18:39
1

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.

| improve this answer | |
  • I hear you, I understand how extensions work. Can I add something after the ".15" (say if I really needed to keep ".15") to tell the OS it's a folder? ... ".folder"? – MicroMachine May 6 at 0:22
  • You can add practically any character with the exception the reserved characters to the end of the file. Maybe an underscore (“_”)? – Allan May 6 at 0:27
  • @Allan all of those characters are allowed in macOS. – At0mic May 6 at 4:15
  • 1
    No bash needed: Select all your folders > Right Click > Rename X items... > Replace Text – JBis May 6 at 13:41
  • 1
    You can’t tell macOS to identify something as something else. Try creating it in terminal. I create directories like something.conf.d as a directory for conf files of a particular app all the time. Finder may not allow you to create it, but you can do it at the command line. – Allan May 6 at 16:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .