Lesson 2 - Things To Know About Programming Processes
Lesson 2 - Things To Know About Programming Processes
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 B Folder B2
Folder A2
Folder A Folder A31
Folder A3
Folder A32
Folder A4
WINDRIVER E:
Folder B2
Folder B
Folder B3 Folder B33
Folder B4