1

I just realized that I have a folder and OneNote Notebook (that is located in a another folder) with the same name. Is this a bad idea? Could the filesystem mix them up?

2 Answers 2

0

No, it isn't a bad idea. No, the filesystem won't mix them up as the file system keeps track of files and folders not just with their name but also by their type and the complete path (location) to it.

For example, if you create a folder named Documents in the Desktop and another folder named Documents in your Home directory, the filesystem won't mind as they are in different locations -

one will be at /Users/Katrine/Desktop/Documents

while the other will be at /Users/Katrine/Documents.

The filesystem also keeps track of whether something is a file or a folder. So a file and a folder can have the same name too without any conflicts. But you can't have 2 files (or 2 folders) with the same name in a common folder.

What about 2 different types of files - like a word document and a photo?

Again, they can have the same name because the filesystem knows they are different files (technically, they actually don't have the same name because of the extensions in their name - the .docx part for word files and .jpeg part for photos - which is also how the filesystem knows they are different.).

1

You can easily have files (and directories) with the same name in different directories. You actually already do, even a plain macOS installation contains files/directories with the same name in different directories) (e.g. /System/Library and /Library, and then ~/Library for each user account).

You must log in to answer this question.

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