Download presentation
Presentation is loading. Please wait.
Published byGreta Lisbeth Gundersen Modified over 5 years ago
1
Brent M. Dingle Texas A&M Directory Structure
CPSC 110 – Pascal Brent M. Dingle Texas A&M Directory Structure
2
Directories – Review Here we will look in closer detail at the DOS directory structure as presented in Chapter 1. We will also present some examples of full and relative paths as well as how to navigate through the directory structure.
3
Directories - Review DOS directories are tree structured, this implies a hierarchical relationship among directories. The top, or main directory, of a drive is the root directory. DOS directories may contain files and/or subdirectories.
4
Full Path Name - Review A full path name is a list of directories you would pass through in going from the root directory to the file. If the drive letter is known it IS part of the full path name. (do not be misled by the textbook) The full path name ends with the filename.
5
Relative Path Name - Review
A relative path name is a list of directories to a file relative to the current directory. The relative path name ends with the filename.
6
Example Directory Structure
7
Full Path The full path of TicTac.pas would be: C:\Games\TicTac.pas
The full path of bank.pas would be: C:\Homework\New\prob2\bank.pas
8
Relative Paths If the current directory is: c:\Homework then the relative path to bank.pas is: New\prob2\bank.pas
9
Relative Paths (cont) If the current directory is: C:\Homework then the relative path to Data.txt is: ..\Data.txt the relative path to TicTac.pas is: ..\Games\TicTac.pas
10
Relative Paths (cont 2) If the current directory is: C:\Homework then the relative path to Hello.pas is: New\Prob1\Hello.pas
11
Changing Directories If the current directory is: C:\Homework
To change to the New directory, at the DOS prompt, we would enter the command: cd New
12
Changing Directories If the current directory is: C:\Homework
To change to the Prob1 directory, at the DOS prompt, we would enter the command: cd New\Prob1
13
Changing Directories If the current directory is: C:\Homework
To change to the Root directory, at the DOS prompt, we would enter the command: cd .. Or we could enter: cd \
14
Changing Directories If the current directory is: C:\Homework\New\Prob1 To change to the Root directory, at the DOS prompt, we would enter the command: cd (three times) Or we could enter: cd \
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.