Hi, this is Gary with MacMost.com. Here
are some things you should know about naming files on your Mac.
MacMost is brought to you thanks to a great group of more than 1000 supporters.
Go to MacMost.com/patreon. There you can read more about the Patreon Campaign. Join us and
get exclusive content and course discounts. In macOS you can name your files pretty much
whatever you want, within reason. There are some things you should know about file names though
and also some useful techniques. So how long do you think Mac file names can be? Can they be 32
characters long? More? Well, it turns out they can be up to 255 characters long. You probably
don't want to use a file name that long. I mean, if you have to read to the end of something that
is more than 200 characters just to see what's the difference between one file and another,
that's probably going to be pretty inconvenient. So you definitely want to keep them short. But
don't be afraid to have file names that are 20, 30, 40 or more characters long if there's
a lot of information you want to include in the file name. So for instance a short
file name is fine. But if you did want to use something long, like this, it could be useful
because it includes a lot of good information. It tells you what's in the file before you open it.
Now are there any characters you should avoid using in file names? Well, it turns out in macOS
you can use almost any character you want. The one hard restriction is you cannot use the colon
character. In fact, if you were to type a colon in a file name you'll get an error message like that
telling you to use no punctuation marks. You can, in fact, use almost any punctuation mark you want,
just not the colon. Another one you should avoid is using the forward slash. So, if I were to
include a forward slash here, even a bunch of them in the file name, it seems to work fine. So what's
the problem? Well, forward slashes are used in path names. So they can be a little confusing
to see them in file names. They do seem to work here fine. But let's take a look at the Terminal.
If I list the files in the same directory in Terminal notice here that that same file appears
using colons in place of the forward slash. So Terminal sees those characters differently than
Finder. Which means that some apps may also see them differently causing all sorts of trouble
and confusion if you use forward slashes in file names. So it is best to just avoid that.
Another character you should be careful with is the period character. In fact,
never use a period at the beginning of a file name. You'll get an error message like this
because the period at the beginning of a file name has a special significance
in the system. Now you definitely should use periods when you want to specify an
extension for the file. Here you see .pages, .rtf, .app, .mp3. That's the proper place
for a period. You can actually put a period somewhere else in the file name like that,
if you wish. The last period is the one before the extension. But a lot of people
like to avoid using periods completely, except for the extension, just to make things clear.
Another thing you may want to avoid is spaces. You can see I use spaces a lot here in these
file names and they are perfectly fine to use in Mac file names. But if you're using a file
on a web server, like you're creating a html, or css, or JAVA script file that's going to be
uploaded as part of a website, well web servers don't use spaces in file names. So it is going
to convert it and it's going to look really messy. So which characters can be included?
Well, I'm going to start off with the same one there. Spaces. Use spaces when you're
creating normal files normal file names. It helps separate words. It looks natural
and perfectly fine to use in macOS and all other modern operating systems. Yet I still see people
avoiding spaces or using underscores when it is not necessary. You could also use upper
and lower case letters. You can see how I do that in many of the file names here. That's
perfectly fine too. There are people that still suggest that using all lower case for
file names. But there's no need. Just use upper and lower case letters as comes natural to you.
Now you can also use special characters. So, if I'm typing in a file name like this I can
actually use Control, Command, and Space or the Globe and e key to bring up the Emoji
and Special Character viewer and I can add all sorts of special characters, like emoji,
to file names. This can make it easy to spot a commonly used file in a long list. There's a
lot more here than just emoji. For instance, there are flags that you can use. It could come in real
handy if you have files that pertain to different countries or languages. There are symbols that you
can use as well. You can search for them and these can help for files to standout in the list.
Now another restriction on file names is you can't use the exact same file name twice. So,
for instance, I can't use this file name again. If I try to use it right here
I get an error message like that. However, it is perfectly normal to use the same file name
before the extension. Here I've got two files names that seem to be the same but the extension
is different. It's common, in fact, to have a folder maybe for a project and to have maybe a
spreadsheet associated with that project and also a word processing document associated
with that project. Give them the same name and it really helps you to remember that these two files
belong together. Of course you can also have files with the same name in different folders. That's
normal too. For instance here I've got a little Info.rtf file and it maybe my standard practice
to include a file of that name in every project folder. Another thing to keep in mind is that
while you can use upper and lower case letters in file names, you still can't have two files
with the same name but with different case. So, for instance, if I were to rename this file here,
an example, but all lower case it is still not going to work because I've already got that file
name here. The case of the letters is really just cosmetic and they're considered the same file.
Now how about these file extensions. Do you need to use file extensions? Well,
you don't always need to, but definitely should. File extensions give a clue to the
operating system of what type of file it is. What app will open it. Now you may not
see files extensions with all your files. You go to Finder Settings and then you go
to Advance there's an option here for Show All File Name Extensions. If you turn that
Off you may notice that some files don't have an extension. If you get info for that file
there's actually a checkbox under Name and Extension for Hide extension. So if that is on,
and you've got the Finder Setting here turned Off then you won't see an extension for that
file. But it is still part of the File Name even if you don't see it here. The way this becomes
checked or unchecked usually isn't by going into Get Info here. It's when you create the file. If
you give it a file name and you type .rtf or .txt or whatever then it will automatically turn Off
Hide Extension. But if you just type the file name and don't include an extension then the app will
put the extension there and the box Hide Extension will be checked. So if you're wondering why some
files have this and some files don't it's probably how you named the file at the time you created it.
So how about file sorting. Well files, of course, are sorted alphabetically when you sort by name.
But what happens when you have numbers. A lot of people like to do this. If they know that they're
going to go into double digits with the numbering files they will put a leading zero before the
early numbers. But it turns out you don't need to do that. The Finder knows about numbers and even
if you take off the leading zero you can see it still knows to put the files in the proper order.
So it is not putting 7, 8 and 9 after these even though these start with the digit one.
Some people still like to put the leading zero there so things look a little neater when they
scan the list with their eyes. But if you do want to have a file appear at the top,
even when the list is alphabetized, you may want to put a character before it that makes
it alphabetically first. For instance, for this file here if I include the underscore,
a common practice for this kind of thing, you can see how it jumps to the top. Another common
one to use is the tilde character. Sometimes you can just use a space at the beginning,
like that. Or just about any symbol or emoji will put this alphabetically before the rest.
How about using Dates in file names. You may want to have your files sorted by date
or just have the date indicated there in the file name because it is different than
the date created. For instance, you may scan a receipt or create an invoice that is for a
specific date but you're not creating it on that exact date. So the date modified
or date created doesn't really reflect the date that is important in the file. So you
could put a date as part of the file name. It's best to keep using the same format,
whatever you choose. You don't want to use slashes for reasons I explained before. Also for sorting
you probably want to start with the year and then the month with a leading zero, and then the day
with a leading zero as well. A format like that is really handy. It's easy to see the date right
there and if you use that throughout all of your files it's easy to search for it as well.
Some people like to do this without dashes. So something like that. But it's a little bit harder
to sometimes figure out the month and day without those dashes there for your eyes to focus on.
Now you maybe tempted to have really long file names, like I mentioned before, so you can easily
find files in the future by putting lots of good key words in the file. It makes it really easy
to search for it. But you need to do that. A lot of people don't realize that when you search for
files in the Finder you're not only searching for the file name, but you're searching for the
contents of the file as well. So if it is a text document, an rtf, a Pages document, a spreadsheet,
it's going to find text inside the document, not just the text in the file name. But this
can also cause problems. As you can come up with all sorts of files for a search and you
know that what you are searching for is in the file name. Well you can search by name as well.
If you start a search here and you type that you should see Name Contains as one of the options.
If you select it you could see how it changes to Name and then what you are searching for. A short,
quick way to get there is to type Name colon and then without a space type what you're
searching for. This will automatically go to a Name search rather than an everything search.
Now earlier we talked about characters you should avoid on your Mac, a colon, a slash, and using a
period in certain ways. But besides that you can use anything you want on your Mac and, of course,
that will also work on iCloud and iOS and iPad OS. But we don't always just have our files on Apple
devices and systems. Sometimes we transfer them to Windows computers or put them on other Cloud
accounts. It turns out most of those are far more restrictive of what you can use. For instance,
here's a page that Microsoft has for Windows that talks about what you can and can't do
with file names. There's a much longer list here of characters that you can't have in
file names and it is just not operating systems. Online Cloud file sharing systems, like Dropbox,
also have lists of characters you should avoid. You can see some of the same things you see here
in Windows and in addition even emoji should be avoided if you're using Dropbox. So if you
find you're putting files in all sorts of different places you may want to restrict
yourself quite a bit more than you would if you're just having your files on your Mac.
So I hope you found this look at using Mac file names useful. Thanks for watching.