cmd-comands

CMD Commands (Windows Command Prompt)

The command prompt is nothing but an interface that can interact with the user. If you know every single command of CMD, you can literally do anything that a user can do with a mouse and other input devices. The main purpose was to replace the DOS command version which was available previously with the DOS. The commands used for the CMD is not really hard to remember and can be easily used, too.

Few CMD Commands

/C– it carries out any command specified using the String and then it will terminate.

/K– It starts the command execution specified using String but then remains

/S– using this you can modify the operation what happens after using /C or maybe / K

/Q– Turns off the echo option

/D– it will disable any autorun program from the registry itself.

/T:fg– this command is used to set the background or the foreground color.

/E: ON– this command will allow you to use the command extensions.

/E: OFF– stops you from using the command extensions

CD– used to change directory, from one to another. To change drive, just type Drive-name and press Enter.

MD– Used to create a new directory anywhere in the system.

CD..- This command is used to go to the previous folder.

SETLOCAL– Used to denote the start of local variables

ENDLOCAL– Used to denote the end of local variables

IF: This command is used for the purpose of coding to be specific. To denote any kind of conditional statement you can use the IF and it will check the condition and decide the flow of the action.

FOR: This is used for the loop. In case you want the same operation to be done for multiple times, you can set a condition and then use a FOR. Till the condition is true, the loop will keep on going. Once the condition is false the operation will be out of that loop and will proceed likewise.

CALL: This is used to call a particular set of codes or a function. You can use this in case you want to reuse your codes which have used somewhere else. This is really helpful to shorten your codes and efforts. Works fast and after execution of the code, returns back to the line from where the CALL keyword was used.

GOTO: This is not a conditional statement neither a function call. This is a specific instruction. Normally used as a result of the conditional statement. This will make the operation GOTO a place or at a certain part of codes if the condition is true.

START: This is to denote the start of the program. You can use this to denote from where the code is starting.

So, as you can see, when it comes to the CMD, it is really easy to handle the operations if you know all the commands and when to use which one. Once you have understood all these, you can start doing them yourself and practice them a lot before you can test your skills in the open.