Okay, let's do a quick little crash course, a Command Line
crash course for Windows.
So throughout this course and through a lot of other videos
on the Internet, you're going to see a lot of Unix like commands,
so commands like 'ls' or 'ls -la',
and that clearly is not going to work in our Command Prompt.
And just to take a quick step back there, if you're wondering,
"Oh, Kalob, what is a 'Command Prompt'?",
'Command Prompt is when I go down here and type 'Command Prompt',
you can 'Run as an administrator',
it might ask you, "Are you sure?"
You say "Yes", you click the 'Yes' button, and it will bring
you to something like this.
So if you want to see everything that's in a folder instead
of 'ls -la', which is what you'll often see on the Internet,
you can write 'D-I-R', 'dir', and this will show you everything
inside of a directory, and look at all that.
I have a lot of things inside of this directory.
Now, which directory am I on?
I am on 'C' drive, 'Windows\system32'.
Now to change your directory, you can type 'cd' to change your
directory, '../' will move you up one directory, and you can
actually see that it's
[no audio]
changing here. I can do that again.
'cd ../'.
It goes up a directory, and then I can do
'dir', see what's in here.
We've got a few things, but I usually want to go to the 'Users'
because that's usually where you're going to be working out
of, is your user profile.
So you could do 'cd Users'.
And then I can do a 'dir' in here.
And I have a user called 'kalob', and a directory called 'public'.
So directory called 'kalob' and 'public'. So let's 'cd kalob',
and this is likely going to say whatever your name is on Windows,
'dir', and I can see all sorts of files in here.
Now, let's say you wanted a folder just for your projects.
You could make a directory so 'mk', and then directory, 'dir', and
then you could call it like 'YourProjects'. If I do 'dir'
you'll see the folder in here called 'YourProjects'.
So now I can go in there.
'cd YourProjects', change directory into 'YourProjects'.
'dir', you'll see, there's nothing in here, zero bytes.
And I can create a new Python file in here if I wanted to.
Now, I'm also inside of my profile at this point.
So if you're using VS Code or PyCharm or some sort of text
editor, you can put all of your files in here and you'll
be able to see them as well.
And just for instance, I created a folder called 'YourProjects'
inside of my account.
Let's go explore that.
Let's go to 'My Documents'.
And, well, that's kind of cool.
I did not realize that would be there, but there's
'PythonScripts' already in there.
Let's go to 'PC', 'C Drive', 'Users', and this is just matching this
location down here.
So I'm going to go into 'kalob', and I'll have a folder,
there it is, 'YourProjects'.
And then you could create a new file in here.
You could open up your text editor.
You code editor.
You could create a new project in here.
You can do all sorts of stuff in here.
But the main thing to know at this point is really you need
to know, how to change directories, go up a level.
You need to be able to go into a directory, so that's just
like 'cd', whatever your folder is called. You need to know
what is in your directory or in your folder with 'd-i-r', 'dir', just like that.
And then lastly, you need to be able to run your Python files,
and running your Python file is as easy as 'py',
and then your file, '.py'.
So 'your_file.py',
assuming 'your_file.py' actually exists.
Last but not least, you might want to get into your Python
shell, your Python IDLE.
All you have to do is type 'py', and you can write all of your
own Python in here as well.
If you ever get stuck in here and you want to get out, you
just type 'quit()', opening and closing parentheses, and you will
get out of it as well.
If at any point in time, you're like, "Oh, no, I accidentally closed this",
that's not a problem,
just go back here, and find your 'Command Prompt',
I always like to 'Run as an administrator'.
Yup, and we're back to where we usually start off.
So that is a quick command line crash course on Windows.
You don't really need to know too much more other than that
for the rest of this course.