0% found this document useful (0 votes)
4 views

Command line in Windows

The document provides an overview of the command line interface in Windows, detailing various DOS commands such as changing directories, displaying folder contents, creating and removing directories, renaming files, and deleting files. It explains how to navigate partitions and use specific commands like 'cd', 'mkdir', 'rmdir', and 'del'. Additionally, it highlights the importance of the command line for performing tasks that may not be easily accessible through graphical interfaces.

Uploaded by

Abdullah Emam
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Command line in Windows

The document provides an overview of the command line interface in Windows, detailing various DOS commands such as changing directories, displaying folder contents, creating and removing directories, renaming files, and deleting files. It explains how to navigate partitions and use specific commands like 'cd', 'mkdir', 'rmdir', and 'del'. Additionally, it highlights the importance of the command line for performing tasks that may not be easily accessible through graphical interfaces.

Uploaded by

Abdullah Emam
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

IT ESSENTIALS

Command line in Windows


Section #2
COMMAND LINE

• The command line is a text interface for your computer. It's a program that takes in
commands, which it passes on to the computer's operating system to run. From the
command line, you can navigate through files and folders on your computer, just as
you would with Windows Explorer on Windows or Finder on Mac OS.
DOS COMMANDS
• Command Prompt, known in short as cmd or cmd.exe and sometimes called the
command line, or DOS commands, is a program or interface that allows you to
perform many tasks in the Windows operating system, in the past (before graphical
interfaces) was dealing With the operating system, it is only through the command
prompt known as the black screen, and despite the great development in operating
systems and the full availability of all device and operating system resources through
graphic windows, the cmd command line is indispensable to perform some tasks.
CHANGE PARTITION

• If you want to change the current Partition, all you have to do is type the letter for the
partition followed by the Colon:, then press the Enter button, for example the
command prompt window now points to Partition C:, if you want to deal with Partition
D, it will You type the following command D: and press Enter, and you'll notice that the
path to partition D has changed.
DIR
• It is an abbreviation of the term Directory or what means the folder, and this
command is used to display the contents of the current folder referred to by the
command prompt, and is used to display subfolders and files within the current
folder, and you can try the command by typing the dir command and then pressing
the Enter button, and you will notice that the command prompt The command will
display the contents of the current working folder, each line representing a file or
subfolder, you will notice that the word <DIR> is written next to the subfolders and
nothing is written next to the files in this column, in addition to some data for each file
from the date it was created, its name and its space if was a file.
CD
• It is an abbreviation of the term Change Directory, and this command can be written
chdir, and this command is used to change the current directory, and this command is
always written followed by the path you want to change relative to the current
directory or the entire directory path.
CD\

• It is used to change the current path to the current partition. If you want to change the
current path to the C partition: all you have to do is type the \ cd command and then
press Enter, and you can type the back dash directly after the \ cd command or you
can leave a space between the command and the back dash, for example cd \
CD ..

• This command is used to take a step back in the path. When you type
cd .. the path will point to C:\Users\Username, and when you repeat
the command it will become C:\Users until you reach the partition.
CLS
• If you are applying the commands that we have already addressed, of course you will
wonder about a way to clean the command editor screen, and this is the function of
the cls command, which is an abbreviation of the term Clear Screen, and its function
is simply to clean the command editor window from the previous commands.
MKDIR

• It is an abbreviation of the term Make Directory, and it can be written in md, its
function is to create a new folder. If you want to create a new folder in partition D, you
will use what you have learned so far to specify the path of the current working
folder, then write the command mkdir followed by the name of the new folder, if the
name of the folder It contains a space, you can type it in quotes, for example mkdir
"new folder", and of course the name of the new folder must not exist in the current
working folder.
RMDIR
• It is an abbreviation of the term Remove Directory, and it can be written rd, its
function is to delete any folder, and the rmdir command is written followed by the
name of the folder you want to delete, and in order to delete any folder, you must first
make sure that the folder is empty, that is, it does not contain any files or subfolders,
As with the previous commands, if the folder name contains a space, the folder name
must be written in quotation marks, and the folder must be inside the path of the
current working folder. For example, if you want to remove the folder that we created
in the previous step, you will use the following command rmdir "new folder".
REN

• It is an abbreviation of the term Rename, and it can also be written rename, and this
command is used to rename folders or files, and writes the command ren followed by
the name or path of the folder you want to rename and then a space and then writes
the new name, and the following example shows how to use it
DEL

• It is an abbreviation of the term Delete, and it can be written erase, and is used to
delete files, as we learned that the RD or RMDIR command is used to delete folders,
the del command is used to delete files, and this is done by writing the command
followed by the name of the file in the path of the working folder, or the full path of
any a file
COPY
• It is used to copy one or more files from one folder to another. For example, suppose
we have a file called a.txt located in the desktop folder and we want to copy this file
to partition D and rename it to b.txt, to complete this we write the following command
OPEN
EXIT

• This command is used to close the Command Prompt


window
THANK YOU

You might also like