150 likes | 196 Views
CPSC 110 – Pascal. Brent M. Dingle Texas A&M Directory Structure. Directories – Review. Here we will look in closer detail at the DOS directory structure as presented in Chapter 1.
E N D
CPSC 110 – Pascal Brent M. Dingle Texas A&M Directory Structure
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.
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.
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.
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.
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
Relative Paths • If the current directory is:c:\Homeworkthen the relative path to bank.pas is:New\prob2\bank.pas
Relative Paths (cont) • If the current directory is:C:\Homeworkthen the relative path to Data.txt is:..\Data.txt the relative path to TicTac.pas is:..\Games\TicTac.pas
Relative Paths (cont 2) • If the current directory is:C:\Homeworkthen the relative path to Hello.pas is:New\Prob1\Hello.pas
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
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
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 \
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 \