1 00:00:00,000 --> 00:00:02,790 Okay, let's do a quick little crash course, a Command Line 2 00:00:02,800 --> 00:00:04,600 crash course for Windows. 3 00:00:04,610 --> 00:00:07,270 So throughout this course and through a lot of other videos 4 00:00:07,280 --> 00:00:10,060 on the Internet, you're going to see a lot of Unix like commands, 5 00:00:10,260 --> 00:00:12,930 so commands like 'ls' or 'ls -la', 6 00:00:12,940 --> 00:00:15,510 and that clearly is not going to work in our Command Prompt. 7 00:00:15,700 --> 00:00:18,610 And just to take a quick step back there, if you're wondering, 8 00:00:18,620 --> 00:00:19,960 "Oh, Kalob, what is a 'Command Prompt'?", 9 00:00:19,970 --> 00:00:23,390 'Command Prompt is when I go down here and type 'Command Prompt', 10 00:00:23,400 --> 00:00:25,340 you can 'Run as an administrator', 11 00:00:25,350 --> 00:00:26,960 it might ask you, "Are you sure?" 12 00:00:26,970 --> 00:00:29,570 You say "Yes", you click the 'Yes' button, and it will bring 13 00:00:29,580 --> 00:00:30,620 you to something like this. 14 00:00:30,630 --> 00:00:33,830 So if you want to see everything that's in a folder instead 15 00:00:33,840 --> 00:00:37,190 of 'ls -la', which is what you'll often see on the Internet, 16 00:00:37,220 --> 00:00:42,210 you can write 'D-I-R', 'dir', and this will show you everything 17 00:00:42,210 --> 00:00:44,100 inside of a directory, and look at all that. 18 00:00:44,160 --> 00:00:46,290 I have a lot of things inside of this directory. 19 00:00:46,590 --> 00:00:48,090 Now, which directory am I on? 20 00:00:48,300 --> 00:00:52,100 I am on 'C' drive, 'Windows\system32'. 21 00:00:52,120 --> 00:00:55,480 Now to change your directory, you can type 'cd' to change your 22 00:00:55,480 --> 00:00:58,600 directory, '../' will move you up one directory, and you can 23 00:00:58,600 --> 00:00:59,700 actually see that it's 24 00:00:59,700 --> 00:01:04,800 [no audio] 25 00:01:04,800 --> 00:01:07,099 changing here. I can do that again. 26 00:01:07,110 --> 00:01:08,930 'cd ../'. 27 00:01:08,930 --> 00:01:11,030 It goes up a directory, and then I can do 28 00:01:11,040 --> 00:01:12,440 'dir', see what's in here. 29 00:01:12,440 --> 00:01:15,200 We've got a few things, but I usually want to go to the 'Users' 30 00:01:15,200 --> 00:01:17,100 because that's usually where you're going to be working out 31 00:01:17,130 --> 00:01:18,200 of, is your user profile. 32 00:01:18,300 --> 00:01:20,800 So you could do 'cd Users'. 33 00:01:21,260 --> 00:01:23,510 And then I can do a 'dir' in here. 34 00:01:24,500 --> 00:01:29,000 And I have a user called 'kalob', and a directory called 'public'. 35 00:01:29,000 --> 00:01:33,000 So directory called 'kalob' and 'public'. So let's 'cd kalob', 36 00:01:33,010 --> 00:01:35,640 and this is likely going to say whatever your name is on Windows, 37 00:01:36,630 --> 00:01:39,370 'dir', and I can see all sorts of files in here. 38 00:01:39,480 --> 00:01:42,270 Now, let's say you wanted a folder just for your projects. 39 00:01:42,280 --> 00:01:46,290 You could make a directory so 'mk', and then directory, 'dir', and 40 00:01:46,300 --> 00:01:52,000 then you could call it like 'YourProjects'. If I do 'dir' 41 00:01:52,000 --> 00:01:55,500 you'll see the folder in here called 'YourProjects'. 42 00:01:55,530 --> 00:01:56,610 So now I can go in there. 43 00:01:56,760 --> 00:02:00,360 'cd YourProjects', change directory into 'YourProjects'. 44 00:02:00,660 --> 00:02:03,300 'dir', you'll see, there's nothing in here, zero bytes. 45 00:02:03,300 --> 00:02:06,000 And I can create a new Python file in here if I wanted to. 46 00:02:06,040 --> 00:02:09,580 Now, I'm also inside of my profile at this point. 47 00:02:09,758 --> 00:02:13,509 So if you're using VS Code or PyCharm or some sort of text 48 00:02:13,509 --> 00:02:16,240 editor, you can put all of your files in here and you'll 49 00:02:16,250 --> 00:02:17,290 be able to see them as well. 50 00:02:17,480 --> 00:02:21,800 And just for instance, I created a folder called 'YourProjects' 51 00:02:21,810 --> 00:02:22,790 inside of my account. 52 00:02:22,800 --> 00:02:23,810 Let's go explore that. 53 00:02:25,400 --> 00:02:26,800 Let's go to 'My Documents'. 54 00:02:26,880 --> 00:02:28,530 And, well, that's kind of cool. 55 00:02:28,530 --> 00:02:30,100 I did not realize that would be there, but there's 56 00:02:30,100 --> 00:02:31,500 'PythonScripts' already in there. 57 00:02:31,600 --> 00:02:39,400 Let's go to 'PC', 'C Drive', 'Users', and this is just matching this 58 00:02:39,400 --> 00:02:40,400 location down here. 59 00:02:41,500 --> 00:02:43,800 So I'm going to go into 'kalob', and I'll have a folder, 60 00:02:43,800 --> 00:02:45,000 there it is, 'YourProjects'. 61 00:02:45,240 --> 00:02:47,340 And then you could create a new file in here. 62 00:02:47,350 --> 00:02:49,440 You could open up your text editor. 63 00:02:49,440 --> 00:02:50,730 You code editor. 64 00:02:50,740 --> 00:02:52,410 You could create a new project in here. 65 00:02:52,420 --> 00:02:53,940 You can do all sorts of stuff in here. 66 00:02:53,980 --> 00:02:57,190 But the main thing to know at this point is really you need 67 00:02:57,190 --> 00:02:59,900 to know, how to change directories, go up a level. 68 00:02:59,950 --> 00:03:02,910 You need to be able to go into a directory, so that's just 69 00:03:02,920 --> 00:03:05,700 like 'cd', whatever your folder is called. You need to know 70 00:03:05,700 --> 00:03:10,400 what is in your directory or in your folder with 'd-i-r', 'dir', just like that. 71 00:03:10,480 --> 00:03:13,380 And then lastly, you need to be able to run your Python files, 72 00:03:13,390 --> 00:03:16,170 and running your Python file is as easy as 'py', 73 00:03:16,180 --> 00:03:18,150 and then your file, '.py'. 74 00:03:18,160 --> 00:03:20,220 So 'your_file.py', 75 00:03:20,560 --> 00:03:23,590 assuming 'your_file.py' actually exists. 76 00:03:23,940 --> 00:03:27,570 Last but not least, you might want to get into your Python 77 00:03:27,580 --> 00:03:28,770 shell, your Python IDLE. 78 00:03:28,800 --> 00:03:31,650 All you have to do is type 'py', and you can write all of your 79 00:03:31,660 --> 00:03:32,970 own Python in here as well. 80 00:03:33,090 --> 00:03:35,730 If you ever get stuck in here and you want to get out, you 81 00:03:35,740 --> 00:03:39,560 just type 'quit()', opening and closing parentheses, and you will 82 00:03:39,560 --> 00:03:40,700 get out of it as well. 83 00:03:40,700 --> 00:03:44,200 If at any point in time, you're like, "Oh, no, I accidentally closed this", 84 00:03:44,200 --> 00:03:45,200 that's not a problem, 85 00:03:45,260 --> 00:03:48,170 just go back here, and find your 'Command Prompt', 86 00:03:48,300 --> 00:03:50,900 I always like to 'Run as an administrator'. 87 00:03:52,600 --> 00:03:55,500 Yup, and we're back to where we usually start off. 88 00:03:55,740 --> 00:03:58,830 So that is a quick command line crash course on Windows. 89 00:03:58,840 --> 00:04:01,470 You don't really need to know too much more other than that 90 00:04:01,480 --> 00:04:02,970 for the rest of this course.