1
00:00:00,000 --> 00:00:04,560
If, like most of us, you use Windows, at some point you've probably gotten a notification

2
00:00:04,560 --> 00:00:09,920
that looks like this, telling you that you can't use certain characters in a filename.

3
00:00:09,920 --> 00:00:17,080
But why? I mean, quotes and question marks are common enough in everyday use, so why can't I just

4
00:00:17,080 --> 00:00:23,280
put them in the friggin' file and what the heck is going on? Is Microsoft just trying to play mind games with us, or do they actually have a good reason?

5
00:00:23,280 --> 00:00:29,240
It turns out, these restrictions are due to how the operating system itself reads filenames.

6
00:00:29,240 --> 00:00:33,880
You see, Windows uses certain characters to denote certain actions the operating system

7
00:00:33,880 --> 00:00:41,200
needs to follow when it's working with a file. You're probably familiar with how backslash precedes the name of a subfolder, and as such,

8
00:00:41,200 --> 00:00:45,240
you cannot put a backslash in the filename, since otherwise Windows would confuse the

9
00:00:45,240 --> 00:00:48,840
filename for another folder that isn't even there.

10
00:00:48,840 --> 00:00:54,440
Similarly, you can't use a colon, since Windows understands a colon to denote a drive letter,

11
00:00:54,440 --> 00:00:59,580
which comes at the beginning of a file path to tell Windows what drive to begin looking

12
00:00:59,580 --> 00:01:02,600
for the file on. What about forward slash?

13
00:01:02,600 --> 00:01:06,080
Well, these can still be used to point to certain resources.

14
00:01:06,080 --> 00:01:10,520
Think about how you can have a shortcut on your desktop to a certain web page that uses

15
00:01:10,520 --> 00:01:17,680
forward slashes in the URL. The question mark, ironically, has the potential to cause Windows some confusion as well.

16
00:01:17,680 --> 00:01:21,680
You can actually use it as a wildcard of sorts when you run a search.

17
00:01:21,680 --> 00:01:27,520
For example, if you want to find all the files that match most of a certain filename, you

18
00:01:27,520 --> 00:01:32,520
can throw in a question mark to tell Windows to return a result for any character in that

19
00:01:32,520 --> 00:01:37,440
space where the question mark is. So it follows that you simply can't use it in your filenames.

20
00:01:37,440 --> 00:01:42,160
Oh, and the asterisk is restricted for similar reasons, as if you search for something like

21
00:01:42,160 --> 00:01:48,400
asterisk.png, you'll get all png files in whichever folder you're searching.

22
00:01:48,400 --> 00:01:52,960
Moving on, quotation marks are disallowed because Windows reserves them to indicate

23
00:01:52,960 --> 00:01:56,640
a full path if the path itself has a space in it.

24
00:01:56,640 --> 00:02:00,440
If you bring up a window shortcut, you can see that the path it's pointing to will often

25
00:02:00,440 --> 00:02:05,920
include quotes by default. This is especially useful if you're trying to put modifiers after the path.

26
00:02:05,920 --> 00:02:10,560
For example, if you're trying to force a game to run in a certain sized window, you can

27
00:02:10,560 --> 00:02:16,120
try putting a space after the filename, then hyphen w hyphen r followed by your desired

28
00:02:16,120 --> 00:02:21,880
resolution. These quotes help Windows know that the space after the filename isn't part of the path,

29
00:02:21,880 --> 00:02:25,720
and that you're instead trying to tell Windows to do something else.

30
00:02:25,720 --> 00:02:29,360
And there are other disallowed characters that you may not see unless you're using

31
00:02:29,360 --> 00:02:32,640
the command line instead of the typical Windows GUI.

32
00:02:32,640 --> 00:02:35,680
The greater and less than symbols fall into this category, for example.

33
00:02:35,680 --> 00:02:39,640
For the other characters and uses that we don't have time for today, I'm sure some

34
00:02:39,640 --> 00:02:46,000
of you can discuss those in the comments and help us out. Of course, Windows approach to this isn't always super intuitive, which is why the

35
00:02:46,040 --> 00:02:52,760
frustration stems to begin with. You can still use periods in a filename, even though the last period denotes the beginning

36
00:02:52,760 --> 00:02:58,400
of the extension, which tells Windows what kind of file it is, so that's a little inconsistent.

37
00:02:58,400 --> 00:03:02,600
And why can't you, for example, use a colon later on in the filename as it's typically

38
00:03:02,600 --> 00:03:06,600
just the first one in the path that denotes a drive letter?

39
00:03:06,600 --> 00:03:09,880
Sometimes characters are restricted simply to avoid confusion, and I get this, can be

40
00:03:09,880 --> 00:03:15,240
frustrating, but you can always substitute my personal favorite, the semicolon, right?

41
00:03:15,640 --> 00:03:21,040
So thanks for watching, guys. If you liked this video, give it a thumbs up, hit subscribe, and be sure to hit us up

42
00:03:21,040 --> 00:03:25,120
in the comments section with your suggestions for topics that we should cover in the future.
