1 / 14

CPSC 110 – Pascal

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.

mazzeo
Download Presentation

CPSC 110 – Pascal

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 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:\Homeworkthen the relative path to bank.pas is:New\prob2\bank.pas

  9. 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

  10. Relative Paths (cont 2) • If the current directory is:C:\Homeworkthen 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 \

More Related