The Windows Command Line Course (CMD, Batch, MS-DOS) | Programming Made Easy | Skillshare

Playback Speed


1.0x


  • 0.5x
  • 0.75x
  • 1x (Normal)
  • 1.25x
  • 1.5x
  • 1.75x
  • 2x

The Windows Command Line Course (CMD, Batch, MS-DOS)

teacher avatar Programming Made Easy, Software Developer

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Lessons in This Class

    • 1.

      Welcome to this course!

      1:30

    • 2.

      Change directory, Clear CMD, Search Files

      8:25

    • 3.

      Opening applications

      5:05

    • 4.

      Copy, Rename and Deletion of Files

      4:02

    • 5.

      Closing running applications

      4:59

    • 6.

      Creating files and folders

      5:59

    • 7.

      Shutdown, Restart and Log off

      8:08

    • 8.

      Echo command and Variables

      11:51

    • 9.

      Loops, Dates and Comments

      4:40

  • --
  • Beginner level
  • Intermediate level
  • Advanced level
  • All levels

Community Generated

The level is determined by a majority opinion of students who have reviewed this class. The teacher's recommendation is shown until at least 5 student responses are collected.

115

Students

--

Projects

About This Class

This class has everything you need to start learning about the Windows Command Line.

We use our mouse and fingers to click images of icons and access files, programs, and folders on our computer. However, this is just one way for us to communicate with computers.

The command line is a quick, powerful, text-based interface used to more effectively and efficiently communicate with computers to accomplish a wider set of tasks. Learning how to use it will allow you to discover all that your computer is capable of!

You are going to learn about the Windows Command Line and Batch Scripting from the very basics.

This class will introduce the command line and help new users get comfortable using the command line.

This course will also cover the most Windows commands used to gather information, manipulate data, and configure systems to your needs.

Batch Scripts are stored in simple text files containing lines with commands that get executed in sequence, one after the other. Scripting is a way by which one can alleviate this necessity by automating these command sequences to make one’s life at the shell more comfortable and more productive. This tutorial discusses the basic functionalities of Batch Script along with relevant examples for easy understanding.

By the end of the course, you will be able to navigate, access, and modify files and folders on your computer, and much more—all without a mouse!

Meet Your Teacher

Teacher Profile Image

Programming Made Easy

Software Developer

Teacher

Related Skills

Development Web Development
Level: All Levels

Class Ratings

Expectations Met?
    Exceeded!
  • 0%
  • Yes
  • 0%
  • Somewhat
  • 0%
  • Not really
  • 0%

Why Join Skillshare?

Take award-winning Skillshare Original Classes

Each class has short lessons, hands-on projects

Your membership supports Skillshare teachers

Learn From Anywhere

Take classes on the go with the Skillshare app. Stream or download to watch on the plane, the subway, or wherever you learn best.

Transcripts

1. Welcome to this course!: Hello guys and welcome to this course on the Windows command line. My name is Alex and I'm a software engineer that has been using the command line in my coding workflow for quite some time now, when I heard of the possibility of creating a course to explain more about these crucial tool, I was quite eager to develop one. This class will be structured in eight lessons that can think practical steps for you to take in order to understand exactly what can be done with the Cmd, I will present to you how you can do anything you are currently doing from the URI or viewer computer, but from the command line, things like creating, deleting and searching for files, editing their content, starting and stopping applications, powering off and on your computer. And also creating batch scripts with multiple sequential instructions. If you're interested in bettering your way around the command line, consider this course for you. There are no other prerequisites than a Windows PC. We can internet connection. For the project of this class, it will be extremely practical and it will involve you to follow the steps presented during this course. So you can start on your journey of using the command line like a true developer, we thought they said, I think we are ready. See you in the first lesson. 2. Change directory, Clear CMD, Search Files: Hey guys and welcome back to this tutorial on the Windows command line or the CMG. This lecture, we are going to discuss a few basic stuff. Starting from the team. The command prompt, how you can help it from the Windows interface. How you can navigate through folders, and also how can you search on files and how you can clear the interface of it. First of all, the quickest and easiest way to open your CMD up on your Windows machine. As you can see that I have on my knees to click on these search by them, right? Chd and then click Enter. It will open up. Now, let's say you are in File Explorer at the path. You want to open it at that Beth, for example, in my case, let's say I'm going to go to see Program Files and then AMD. And let's say I want to open a cmd at this path right here for a variety of reasons. Well, from the Windows File Explorer, I can click on this right here. And instead of the second, just write cmd. And when I click Enter, you can see that it opens up a command prompt. Right here. This is a very useful staff if for some reason you want to do command line type of instruction from a specific path that you're at. That path may be a little bit complicated, or it's just long. And you do not wish to go here in your command prompt to open it up. And then basically just do a bunch of change directory command to get to the path where it was at. This is a much simpler and easier method and it also takes up a lot less time. Now, we are here at the command prompt. We have few simple instructions. So the first instruction we are going to talk about these DIR instruction, which when you write it, it will basically show you all the files that you have available at the path teacher at. For example, you can see that when I wrote that DIR command, I will set the path C Drive Users and then fanned, which is my user. Here I have a bunch of staff, as you can see right here. A lot of directories, you know, the basic ones, Desktop Documents, Downloads and lighter for other specific stuff. Now, you can see that it also shows you the total of directories that you have at this directory. Those so how many bytes are feet are free? In my case, I think these are 159 gigabytes. You can use this command if you are at the path on your machine and you went to list all the elements that are added for you to see them. Maybe to change directory into one of them, or maybe call it an executable that's at that Beth. Now moving on from this command, another very simple command, C command, which basically when you write it and hit Enter, as you can see, it's going to clear, you recommend ramp up so you're not going to see any of the other comments that you wrote before it. And this is actually very useful because it means your command prompt much cleaner and sometimes it just gets messy when you do a lot of stuff in it, like the changing of Directory or maybe calling executables, getting godly into from time to time to have a clean. So that's how you do it CLS and then enter. Now we are going to learn how to change the directory from one directory to another. So I am going to again give it the command which will list all the directories that these path. For example, let's say that we want to change the directory to desktop because basically this is the way your window statue navigate to folders. You just, what you do is change the directory and change of directory. The command brand is done with the cd command and then the name of the folder. So for example, let's say we want to go to Desktop is how we do it. As you can see, the path that we are changed to desktop too. Now if you want to go back, you have to say cd and then two dots. And as you can see, it took you back a notch to the last photo you are at in the File Explorer. This is similar to heating that back button or click the back button on your mouse. Now another very useful thing to know here. Instead, if you want to change the directory, maybe you want to move very fast, or you don't know exactly the spelling of it. You can say cd. And then let's say you wanted to go to the desktop, just say D0. And then if you hit Tab, it will give you something that resembles what you wrote. So each time you hit them, it will give you another option. So if we went desktop, click, Get it. Now, if we went that Designer click here, click Enter. Now, this is very useful when writing the path where you want to go and you don't want to write, although feet or the name of the Father, it just helps you move a lot quicker. Changing directories. Now. Not everything here, of course would be, how can you search for a directory? Your current Beth. How you would do that is by again writing then the name of something you want to find that Python in our case. Then, yes. Then when we wrote that, you can see that it did not find any python file. As you can see here, it says file not found. Now if we click again CLS, you can see that it clear document up. Now if you're wondering, then the name of the folder, let's say they recently did network is because we were at the designer bath. But now if we write that command trying to find pipe and you can see that it had multiple occurrences of it. Now another useful thing to know here is that slash S comes from searching of the directories at your current path. And the speaker means basically pauses the screen after each found entry from what you basically searched for. I think this was about it for the first tutorial on Windows Command Prompt. I appreciate that you stick with me again that this tutorial, and I really look forward to seeing you guys in the next lectures when we are going to furthermore talk about functionalities. This Windows Command Prompt. 3. Opening applications: Hello guys and welcome back to this tutorial where we are discussing the command prompt on your Windows local machine. In this lecture, we are going to talk about how can you open an application? Usually open using your windows, do 3D interface by basically either searching for it or if you have a desktop shortcut for it. By clicking on it. How can you do that from your command prompt is a pretty simple process. As far as the syntax goes. The more tricky part comes when you have to figure out what is the name of the executable file of the dot EXE file that you want to open. Because in case you didn't know each application that you click on. Basically a file that has the extension dot dxi coming from an executable and basically running, That's basically when clicking on that, it would be the equivalent of your main function that gets triggered in your script when coding. And basically it costs all the other stuff around the application. Mpi application is triggered and it just opens up. Now, getting back to our problem, how can you know what is the name of the executable that you want to open? Well, most of the cases is pretty straightforward because you aren't going to note that it's just the name of the program. And then dot EXE. For example, for the browser, google Chrome, the executable would be chrome dot EXE, so CH arrow and then dot EXE, note bed. It would be notepad that the xy and so on. But if you have a new web application that for some reason you would want the future to open it with the command prompt. And you tried before and the main ditch you thought it would have not debt and basically I recommend fails. What you can do. I opened on Notepad file and then I'm going to right-click on the windows bar and I'm going to select the Task Manager. You can also do that by simultaneously clicking Control Alt and then delete. Here, you can right-click on the application that you want to start from the command line. As you can see you, I have the options to go to details. And when you click on go through details, basically highlight the executable file to 21 to have triggered from the command line in our cases, as I've said, an outbred that the syntax of the command is start, SDA, and then the name of your executable. So for example, let's say we wanted to open up Notepad, going to see notepad, that THC. So as long as you're in the C drive, it will automatically look for the executable so you don't have to be specifically at that Beth, because it will find it for you. Right now when clicking Enter, you can see that it triggered the opening of another notebook instance because you already had one where I need. This is a pretty basic way to open up application. Now, of course, you could have wrote just known by dxi. It would've done the same thing as you probably saw if you're a programmer and you're trying to execute a script, you're just going through, for example, typing the name of your programming language, then the name of your script, then some other dishes or slashes. If you want any interruptions to be executed at once which were scraped. And then basically what it will do, it will open up, run your script. This is pretty much the same thing. These executables from the command prompt. But if you're not a programmer, you, just, as I showed you, start, then the name of the executable you want to open up, and then hitting Enter, we'll do the job for you. Thank you guys for sticking with me to the end of this tutorial. I really look forward to seeing you guys in the next few lectures, wherever we will get a better grasp on these command prompt comments on Windows. 4. Copy, Rename and Deletion of Files: Hi guys and welcome back to these CMD tutorial, where we learn more about the command prompt Pin documents that we are able to give it in our local Windows machine. This lecture right here, we aren't going to discuss how can we copy a file? How can we delete a file? How can we also rename a file from there, C and D. So from the command prompt, you can see we are at the desktop path. Right there did I are coming in to see what we have inside our desktop. You can see that I have already created the text dot TXT file, or it is right here. If we want, for example, to copied into the folder that we have, this stop, we can say Copy and then the name of the fact that we want to copy in our case. Then the name of the path where we want to have it copied, the falter would be not because we are already at that. Beth certainly aren't we? If we change directory to the folder and make a gear, you can see that the file and it also weren't a seer data files copied. For example, let's say that we wanted to delete the file from here. We can't just say the name of the file. Going down to give it the DIR command to Sita fast that we have in it. You can see there is no index dot PSD file no more. Now going back to the desktop, we can see that the Techstar PSD file still here. And let's suppose we want to rename it. For that. We have the command R. And then we can say the following. We want to rename and then its new name, let's say abc dot PSD. Now you make a DIR command to see ABC, px d. You can see the name has changed. These are again, very useful commands and very simple comments. Going through them. Once again, document rename or filing. Pizza syntax is then the name of the file you want to have remained, and then the name of the new file, you want it to really be renamed S. Then we have the delete operation, that's d, l, and then the name of the file you want to have the data, That's the whole syntax. Then we have that copy which is principally slopey at why MPT exactly spelled this. We would spell it went right and get the name of the file you want to eat to copy. And then the path where you want it to be copied at. These are three very basic operations that you can now do on your local Windows machine using the command prompt without effort by clicking Control C Control V. Delete effort again, I thank you guys for sticking point me to the entities that I really look forward to seeing you guys in the next few lectures, where we will get more in depth with our command prompt knowledge. 5. Closing running applications: Hello guys and welcome back to another lecture on the tutorial of the Windows Cmd, where we learn commands that we can do from the command prompt on your Windows local machine. In a previous lecture, we looked into how can we start the process, an application using document prompt in Windows sequence the instruction start, and then the name of the executable that we were supposed to run in order for that application to open up. We also looked at how can we find the executable for a particular application that we might want to open from the desk manager. Now in this lecture we are going to see how can we close in application from document prompt and all of the three processes of the tag. Of course, forcefully close. Meaning that without any delays or errors, it will just close by the process and all of its child processes with this command. Basically, you already know that closing the nib, It's a pretty simple process on Windows, you can just click on this red X button right here to close the usual application. But sometimes your application might be not responding. When it is intestate of not responding, you cannot close it. I mean, you can try to close it, but it will not work as it is currently blocked. What can you do to close it in that situation would do as I've showed you, right-click on the windows buying quick desk manager or click entrepot intent, delete, open up the test manager and then close it from there by clicking on it and then click on task. And this should probably get the jump done in the case of the application does not responding. But another way to do that and the way that has the same effect with debt process from the command line and it might be easier for you then doing that in case of various reasons, maybe your Windows does not have a user interface or you just feel more comfortable to do this from the command prompt. We have recommend for debt. I have here notepad opened up. It's an empty notepad that you can also see in the desk manager that it's right here opened up. We can go to Details and you can see that the details for an executable called Notepad that DXC. Now let's suppose we want to close that. We have that command, desk kill. Then I am, then the name of the executable, then D and then F. Here, D comes from the process tree. So it goes here all the three process associated with the Notepad dot EXE executable. So we'd want to leave anything behind training. And then the F comes from forcefully killing all these processes. Thus, skill, I think it's pretty explanatory. It just kills the desk. Then again, the executable file name, it's pretty self-explanatory as well. So the I am comes from the fact that we provide it right here, an executable so that each image, first of all, let's show you that it's running. So when clicking on Enter, you can see that that process weak beat 5216 has been terminated and you can see that the Notepad has been closed. But what you could have done is, well, he's opening notepad right back up. And instead of IM here, we can write it and then give the PID of the process that we wanted to kill bit comes from prices ID. And in our case, you can see right here that it has the bead 8120. If we give it here, 8120, close as well. So there are two ways of killing a task with the command prompt term. More specifically, read the task skill instruction. Thank you for staying with me to the end of this tutorial and I look forward to seeing you guys in the next lectures. 6. Creating files and folders: Hello guys and welcome back to these Windows command line tutorial. In this lecture, we are going to discuss the way that you can make directories on your local Windows machine. And also how you can create any type of file B, vitamin C plus four, just plain text. There are multiple ways to create a fairer and we will go through each of them and show up both their upsides and downsides. But for now, let's get started with how can you make folder at the specific breath on your local Windows machines self-care. We are at C Users fan path. We can quickly change directory to the desktop. Let's say we want to add desktop to create the folder that we are talking about. Let us just MKDIR because that's the command. It is pretty obviously coming from make directory. And then you are simply supposed to write the name of the folder that you want to create. In my case, I'm going to name me tutorial. Now, if we give the desktop path, you can see that the directory tutorial is right here. So now we can change directories, do it. Now. Obviously we are in the tutorial folder. And now that we got to making folder out of the way, we can talk about how can we create a file? The first method to create a file would be do, use node bed for it. You can say Notepad and then the name of the file you want to create. Let's say test.txt. And what this will do, it will fire up Notepad and it will tell you that that dxdy, not an existing file. It will also ask you if you want to create it, and if you click here, it is basically going to be. Now. This is one way to do it, but the method I prefer to create text files and pretty much any kind of file in Windows using the command prompt is using echo. Amend. The syntax for that would be echo. And then you are going to write what you want to write in the 4 third, the chair going to create. For now we're not going to write anything you need. So appoint will suffice and you need to write bigger than then the name of your file. Let's say test got dx, dy. Now as you can see, we have tests to that dxdy along with the simple text. This path. If we open the folder, we click Test to that dxdy. You can see that it has a point in it. Now, the way we can write the meat, you probably guessed it. We can write echo and then write the message you want. In-between these double-quotes. Maybe we can say Hello there. And again we need the greater than sign and then the name of our file. Let's write hello that PSD file. Now if we open that tutorial, you can say that has the Hello there, string attached to it. Now of course we could do something like echo Hello into hello.py. And then we can go like Python. Hello. As you can see, it's working. So what we did here first we created hello.py file system knows it's a Python script and automate print hello. And then when we execute it with Python, you can see that it dropped hello on the screen. So ET executed with no problem because as you can see here, that hello dot py file had the print hello in it. That's why I prefer the icon method of grading new files. Especially if they are text files or fast that you to write, maybe code or some scripting in it. Because you can initialize them with the echo method to write stuff in them when you create them, you can, of course, after the bigger than sine, instead of just writing the name of your file, you can write a relative path to a new file if you want it position somewhere else other than current path that you're on at that moment. Thank you guys for sticking with me to the end of this lecture. I really look forward to seeing you guys in the next one. 7. Shutdown, Restart and Log off: Organizing ball. Come back to this tutorial about the Windows command line. In this lecture, we are going to discuss different actions regarding the powerline to say of your machine that you can do from your command line on your local Windows machine. The beauty of these commands is that they can be executed pretty much from any path. That is not a factor. Here, unlike all the other methods that we saw, they were somehow regarding had a connection with the relative path. You are going to discuss more concretely, how can you shut down your computer from the command line? How can you log off from your computer from the command line as well? How can you restart your BC from the command line? And also, how can you abort the shutdown process before it happens? For o of those actions that I mentioned before, there is a single command that does them all, but obviously with some different inhibitors that it takes. And there might be a variety of reasons why you would want to shut down, restart, and log off from your computer from the command line. Because the command line is pretty much window for the homing dose. And sometimes, pretty often actually, when you open a command prompt with administrator rights, you can go and write commands in parts of Windows that you otherwise wouldn't have been able to do just from the UI and as a usual user. Now, getting back to our shutdown command, if you open up your CMD, I said it doesn't matter what path you are on at that moment. You can just write shut down. A bunch of information is going to pop up as to how you can use these methods. From the command line. We are going to run through each of the sections that I've told you I'm going to show you and then maybe look at some others. Dead might seem a little bit important. First of all, you'll get the usage of the shadow command. This is the syntax that you want to call it width. So first of all, the keyword shutdown, and then a bunch of arguments that can be ILS, SGR, GAA. Oh, then you can specify if it's a hybrid that performs a shutdown of a computer for the first startup and must be used to the width S option that we are going to get to in a moment is what it does. And then the soft keyword, the FW and then the F. F. First learning the obligation is to close without forewarning the users. This parameter is implied when a value greater than 0 is specified for the T parameter. The deep parameterised. Something to do with meaning in what time you would like for your action to take place. Now, getting back to these first set of parameters that you can give it. The first parameter that you can give it. For the shutdown is slash S. Can see shutdowns the computer. Right now if we were to want to shut down this computer, you would write shut down in there, slash S. And if we would press Enter, my computer right now would shut down. But obviously, I don't want to do that for many reasons. One of them being that recording would stop. This is how you shut down your computer. Now, the R is the full shutdown and restarted your computer. So as you can see, both S and R are in the first set of parameters. So right now if we would right arm instead of my computer, would restart, it will shut down in them. Power on again. How can you log off? Well, with this parameter that again is right, that's the first is written as the first parameter. You can see in the documentation that means log off. But again, if you write slash l, will love me off. These windows machine used to onboard system shutdown and can only be used during the timeout period. This is the scenario when we wrote shutdown slash S and when we run it, that will give us a warning that our Windows machine is going to shut down in a minute or so. So it gives us a little bit of time. It may be saved some work or get prepared for the shutdown of the system. And in that time, if you want to not shut down or restart a machine or more, you can give it the shutdowns dash a, if you change your mind about that action. Of course, we have some other parameters here. These were the main ones. Now we have a slash d parameter test the reason that you wanted to restart or shut down. And it has little syntax of its own. But other than that, we have G. It's pretty much like a slash. Restart your computer. Just that after the system is rewarded, the automatic Restart sign-on is available. You can automatically sign in and lock the last interactive user. As I've told you before, the slash d here, it says the timeout period before the shutdown. Do then three digits of seconds minus the valid range, 0 up to ten years, which I find there'll be 20. Default of 30. So work. Now we can see that it deletes 30 seconds as a default when you shut down without specifying the argument. The demo period is greater than 0. Direct parameter is the implied. The f parameter was closing the running applications without telling me the users that it will do so. It's also a possibility that you can want to, you may want to restart your computer an hour from now or shut it down, maybe you believe or something and you do not want to shut it down from shutdown button is everyone would do. You can use this command to shut down your computer at a specified time that you choose. These are all pretty useful commands when using the command prompt. Indeed, good for you to note them. Know that they can be done from here and how they can be done from here. Thank you guys for sticking with me at the end of this lecture. And I am going to see you in the next one. 8. Echo command and Variables: Hello guys, spend. Welcome back to the command line tutorial, where we learn more about how can we improve our CMD commands and instructions and the things that we can do from the CMT in Windows. In this lecture, we are going to take a look overview of batch file scripting. Getting started with this topic, we need to understand that the fast it can be run from the command prompt files with the extension of that BAD. These are called Window's batch for us. And they are basically just like any other file that contains lines of code they need, like a Python script would, or a C plus plus script. Now, the thing with this batch scripts, they can be executed directly from the CMD. And it contains a batch script into that the CMD can recognize and compile it. First of all, let's try to create a bed file. So a batch file on our desktop. We are going to change directories to then stop and then document that we learned about how can we create a file at our specific path? Echo bigger than and then the name of the file we want to create. My case, I will name it. Dark, BAD. When I click Enter, this file will be created on top, so I will right-click on it, click on Edit. And Windows will automatically open it in Notepad. Here it is, by default, is written in that echo is this echo command comes from an echo, which is the sound that is made for intercostal space at the sound comes right back to you. And in our case, on a more concrete level, it means that each instruction that you write in BP file will be written as well when you execute that VHD file from the command line. For example, the cycle is by default on, and that's why it says the takeaway thoughts. If we say echo and then pause. If ACA would be off, it would just say hi and then prompt the rest to press a key. But if it is on, so right now it does not because it is on by default. It will also write echo high and then pause. If I save this file and I go into CMT, I can just write test that we keep because we are back where our script is Antoinette click address, you can see it says echo high, which is the instruction. And then it also says Boss. Then press Continue. It is pretty straightforward. That's from the past. So the policy instructions has the Rome to postscript at that point and wait for the user to press another key in order for the script to continue. The echo instruction other than being set to on and off. Depending on debt. Writing the instructions of the script as well along with what it should output, also has the row printing stuff on the screen. So it's equivalent. You see plus, plus would be C out or biotype. And other programming languages would be the print instruction. As you saw here, when we write echo high, it says high. But now what we fully want to turn this outcome instruction of soap on our script. Suppose we just wanted to put high instead of the instructions of the script as well. Well, you can go into your BAP file and at the top of it, you can write off. We save that. And trying to grant our script again, you can see that it just said high impedance, say. Echo high or pose anymore? Of course, the state of high weekend, pretty much any string going now, 40 sample. Let's also write my name and go 123. Just so we are sure that it's working and it is working. I put them after the pause instruction, and that's why it showed them after. Because these batch files function of programs that execute in a sequential order before moving on to variables. Another thing here, which is called jump to label. These are labels that can help you skip part of your script. For example, here, let's say that you want to pause here, but you did not want the echo Alex instruction to execute. But you want it the whole script to execute. Other than this, it, well, we can do this using the jump to Labels. More specifically the go-to keyword, which is followed by a label. So how this works is as follows. You need to separate your Caltech don't want that, you don't want to be executed by the go-to instruction. And then a random name that you choose, your labeled B. I will choose label. Then you need to write that book points and then the name of your label. Where do you want your execution to skip? For example, here it will say echo high, so it will see high, but then it will not say Alex anymore. And we'll directly say 123. Quick, any key after the pulse. Let us say this and see that this is actually the way it said high. Then on Enter, it said directly 123. This is attraction works. It skips this line of code. This can be very useful if you want to leave something unimplemented or you just want to skip part of good execution of your batch file stripped. Weekend talk a bit about variables as you saw up to this point, when we encode something with the echo command, all we did was echo hard-coded strings. So strings that we actually gave ourselves. As in other programming languages, you have the basic ability to declare variables that you can initialize with numbers or even strings. Output that as you go, even do operations on them. Let's say we want to create two integrals. We want to echo on the screen. Some of them syntax to declare a number in CMD would be set, then slash, then the number of your variable, let's say the value one. Then Enter, then equal, and then a number that you want to be equal. For. Now let's say, I want to just make sure that it works. This. You notice if we execute the script like this with the value one, even though we have a variable named value one, it does not understand that this is not a hard-coded string that we gave it. And it will actually output value one instead of 13. How could you do it for it to recognize that you met this variable right here and output 1302 percentage before and after the name of your variable. And now we click Enter. You can see that it actually recognize that it is a declared variable. It can do operations on them. Now furthermore, weekend of course, declare another variable. We can keep some of these values to a third value and became actually output that we got echo method. Right now let's see if this works. When we call the test.py file. You can see the sum is actually on the screen. It works. Now of course here instead of the plus sign, you can have minus times or even division and it will work just as well. We talked to your arithmetic operations that we know in math. So for example, let's try my best to make sure that it works. You see here these minus 54, which is correct. Now again, that slash a that we saw before, the value that was added here like that only needs to be there if you want your variable that you declared to have a numeric value. If you went for it to be a string, you can just directly write set, then the name of your variable, then equal to the hard-coded string that you want. For that variable to have. Then you can write as well, echo of that variable name. And it will output your string. You can see here it says Hello world as it is about P2V2 over a few of the batch script files using and execution of them from the cmd of your windows local machine. I thank you guys for following this tutorial. We'll look forward to seeing you guys in the next one. 9. Loops, Dates and Comments: Hey guys and welcome back to this Windows command-line tutorial where we learn how can we make the most out of our command lines on our Windows local machines? In this tutorial, we are going to take a quick look at a few of the functionalities that are available in DOC BAD files, scripting programs that can be run from the command line, as we already saw in the lecture. First of all, I create a data file on my desktop that I call it this, that I started things off week. Echo command. If you remember what the deed, it's just muted. All of your programs lines. So in order for you, when you call debt diabetes from the command line to just echo the things that should be echoed and not the entire script. Then we are going to take a quick look at how can you make comments that I obviously not going to be executed in dispatch programming script. The first way to make a comment by taking the sine of double points WE, and then you can write whatever entry, what gets executed. The second one right here. And then whatever comments you wanted to do in your script. These Arielle comes from remarks, which is separately matches synonym with comment. Now, I don't even know if I should get two reasons why you're, it is a good practice for you to comment your code. Main reason would be for you to document it in case you get back to it later in Photoshop, what you try to do it there. For some other programmers that want to give your code, maybe it will make it easier for them to understand if your code is common deed in the ED cell. Explained going furthermore, we can see here that we can also echo that date in-between these percentages and what it does. It's basically echoes that today's date. So if we go in our cmd and we run this program, you can see right here that shows that today's Wednesday, the 25th of April 2021. The date when I am recording this course. And then what they did here was set an array that I gave pretty much the numbers from one to eight BC ratio of numeric values. And then I also do a loop through it to show you guys that of course conditional statements like if and LLCs, and also loops like for him, while. However available in bash scripting as well as the other major programming languages. And DC is the quick syntax for it. So you have a four, then the two percentages sign showing that this iss declared variable here. And then up it, these are iterating. These Trudy's, my array which I declared here as well, limited to some percentage you can then do. And then we will echo to fail. You see me? You run the program. You can see that the numbers one through eight are shown on this screen as we expected because of these four loop right here. These are some quick things that I really wanted to cover in this lecture. So again, the way you can comment in a dark BAT file, the way you can output the current date. And of course, the way you can iterate through an array which is available in batch script programming as well. Thank you guys for sticking with me at the end of this tutorial and I really look for active. See you guys in the next ones.