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

Lesson 2 - Things To Know About Programming Processes

The document discusses how to change folders in a command line interface using the cd command, which allows you to navigate the file system and move between folders by specifying folder paths. Common cd commands include cd to move into a folder, cd.. to move up one level into the parent folder, and cd/ to go to the root drive. Examples are provided of cd commands to navigate between different folders in a sample file directory structure.
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views

Lesson 2 - Things To Know About Programming Processes

The document discusses how to change folders in a command line interface using the cd command, which allows you to navigate the file system and move between folders by specifying folder paths. Common cd commands include cd to move into a folder, cd.. to move up one level into the parent folder, and cd/ to go to the root drive. Examples are provided of cd commands to navigate between different folders in a sample file directory structure.
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 12

Things to Know about

Computer Programming
Lesson 2
NEIL A. MUTIA, MIT
Changing Folders in a Command Line
Interface
 A command line interface works in one specific file folder.

 The specific folder is called the working folder (or the working directory)
Changing Folders in a Command Line
Interface
 In Folder, switching to a different folder is done by clicking
icons.
 In a command line interface, this switch is made by typing
a special command
 The name of the command is cd (which stands for “change
directory”).
 The syntax of cd is:
cd FOLDER_PATH
FOLDER_PATH specifies how to get to the target folder from the working
folder
Changing Folders in a Command Line
Interface
Changing Folders in a Command Line
Interface
Common CMD Commands in JAVA Programming
# Commands Description
1 cd FOLDER Changing directory, going inside the specific folder
2 cd.. Changing directory, going outside the parent folder.
3 cd/ Changing directory, moving at the root drive
4 dir Listing all file inside the current folder
5 E: or C: or D: Changing drive directory
6 cls Cleaning the displays in CMD
7 javac program.java Compiling the Java Program
8 java program Running/ executing the Java Program
Changing Folders in a Command Line
Interface
 The folder moves are composed of two basic moves: moving
to one of the folders that belong to the present folder or
moving to the parent (that is, the folder that the working
folder belongs to as a subfolder).
 To move to a child folder, the path that is specified is the
child folder’s name.
 To move to the parent, the path that is specified is .. (i.e.,
two periods).
Changing Folders in a Command Line
Interface
Example File Directory Folder A1

Folder A Folder A2
Folder A31
Folder A3
Folder A32
WINDRIVER E:

Folder B1 Folder B11

Folder B Folder B2

Folder B3 Folder B33


My File Directory Video
Changing Folders in a Command Line
Interface
 If your command prompt current folder is on WINDRIVE E: and you
want move inside the folder Folder A, the command will be
cd Folder A
Changing Folders in a Command Line
Interface
 If your command prompt current folder is on
WINDRIVE E:\> Folder A\ Folder A1 and you want move towards the parent
folder which is in this case is Folder A, the command will be
cd . .
Changing Folders in a Command Line
Interface
 If your command prompt current folder is on
WINDRIVE E:\> Folder A\ Folder A3\ Folder A31 and you want move
towards the folder Folder B3, the command will be
cd . .
cd . .
cd . .
cd Folder B\ Folder B3
ASSESSMENT 1
Folder A1

Folder A2
Folder A Folder A31
Folder A3
Folder A32
Folder A4

Folder B1 Folder B11

WINDRIVER E:
Folder B2
Folder B
Folder B3 Folder B33

Folder B4

Folder C Folder C1 Folder C11

You might also like