 Welcome to end-to-end machine learning course 112, getting ready to learn Python, Windows Edition. This is the second video in the series and in this one, we'll look at using the command line interface to navigate through directories and to look at files. In the first video, we looked at directories and files using the File Explorer. Now we'll look at a different way to do the same thing that becomes a little more convenient once we start writing Python code. The first step is to go to our search bar and search for the command prompt. This pulls up a console. It's a classic black-and-white bare-bones interface. Think back to 1980s hacker movies where you can go in and type commands and get the computer to do things. This is interacting with the computer on a pretty low level, so you can tell it very directly and specifically what it is that you wanted to do. What we see here tells us that specific version of the Windows operating system that we're working with, version 10.0, point a bunch of numbers, and it tells us the directory that we're located in. The C directory represents all of the disk space for this computer, and then it has a very high-level directory called Users, and then there's a directory specific for me, b-roar, that's my username. This is then a command prompt, meaning it's waiting for us to type something, to ask it to do something. The very first thing we'll do is type dir short for directory, and this lets it give us more information about the directory in which we currently are sitting. It says it's in drive C in Windows. We knew that already, but it's good to get that confirmed. It tells us that we're in C users b-roar, and then it goes and it tells us within this directory b-roar, what are all of the other directories and files within it, and it lists them out together with when they were created. Dir shows that they are directories as opposed to files, and then we get to see their names. You'll notice that it's similar to the information that we saw in the file explorer, but now instead of having it be graphical, instead of having nice little pictures of folders, we just have it listed. So it's not quite as visually appealing, but will probably help us understand everything we need to know to do what we need to do. You can see again, here's our desktop folder, documents and downloads, pictures, music, videos, all of the same folders. Now the second command is cd change directory. This lets us move from the directory that we're currently in, in this case b-roar, to any one of these other directories within it. So we'll say cd desktop. That will be the equivalent of double-clicking on the desktop icon in the file explorer. Here, that brings us down one level in the hierarchy, from b-roar to b-roar desktop. A third convenient command here is cls. That just clears the screen. It's totally for convenience for removing visual clutter, but it lets us erase everything and get back up to an empty screen. Now that we're in the desktop directory, we can type dir and see the contents of it as a directory. And all we see is a one dot and a two dots. One dot is kind of a special code. It means this here current directory that you're in, so in this case the desktop directory. The two dots is a code that means it's parent. The directory right above it. So in this case it's the b-roar directory that we just came from. If we want to jump back up to the b-roar directory, we can type cd space dot dot. So that's a code that says change a directory, but go one level up. Go to this directories parent. And we type dir again. We see exactly the same thing. We've confirmed that we are in the b-roar directory. Now let's go into the documents directory. CD documents. We can type dir again to see what it holds. And not surprisingly, but still very cool, we can see exactly what we saw before. An empty directory, directory with one file in it, directory with other directories in it, and a directory with several files in it. Also our special single dot and double dot codes for the current and the parent directory. You can see this is all of the information that we can see in the file explorer just in a different form. We can do a cls again to get our screen clear, clear our head, and you can probably see where this is going. We can cd down into an empty directory. We can check it out with a dir command to see what's there. Nothing, just the single dot and the double dot. No problem. We can cd two dots, go up one level, back to the documents folder. One trick that's really helpful here, especially when you have long file names, is you can start typing the name of a file or a directory and hit tab. And then automatically, if it's clear what file or what directory is referring to, the command prompt will just complete the name. It'll fill it in for you. Saves a lot of typing. Now we can cd to a directory with one file in it. Check and see what's there. Sure enough, one file, a text file, dot text. We can confirm that it has 28 bytes and then we can jump back up. Now if we want, we can put these together. We can jump back up with the two dots and then we can use this backslash to say and go to the directory with several files in it. So go up one level, backslash, and then down into this directory. Now we can use the dirr to see what that directory contains. Sure enough, we have a text file, dot text and restingpup.jpg. Now I want to call out here the text file is just 28 bytes but that jpeg of the pup is almost 2 million bytes. So roughly 100,000 times bigger. This is very common. Text files are very small. They are tiny. Images can be much bigger. Audio can be bigger than that. And video is bigger still. So whenever you're dealing with text, you can store the entire library of Congress in text on your hard drive without even making a dent. But if you start trying to save the whole fast and the furious series, you'll eat up your hard drive very quickly. So good to keep in mind. This is especially relevant for us because when we're writing Python code, we're just writing text files. Instead of ending in a dot txt, they'll end in a dot pi so we know that they're Python files but they're still just text. Which means you can write Python for the rest of your life and you're never gonna fill up your hard drive with those Python files. Now we'll jump back up to the documents folder and we'll jump down several levels to a directory with other directories in it through another directory into yet another directory. With these backslashes, you can sandwich as many of these jumps together as you want. You can step up, you can step down, you can do it as deep as you want to go, as many steps as you wanna go, it doesn't care. After we make that jump, you can see our command prompt shows our now very long path that we're in C users, b-roar documents directory with other directories in it, another directory, yet another directory. And this is just another way to represent the exact same thing that the file explorer was showing us. We would expect to find in there then a text file, curious pup JPEG, and still another directory. And that's exactly what we see there. Now, if we wanna get back to where we are going, we can do some multiple jumps, dot, dot, slash, dot, dot, slash, dot, that jumps us up three levels. We're back where we started in the documents folder. So congratulations, with the dur and CD commands, you can jump around through the file structure, through the directories in your Windows machine and see where everything is. You can navigate, you can check out size, you can see when it was created. This will come in handy as we start writing Python files and manipulating them.