ERODD HOME

Operating Systems CPSC 304
Windows Command Line Lab
Earl Rodd erodd@malone.edu Extension 8546 www.malone.edu/erodd

Overview

This lab may be done on any Windows machine. If you are familiar with the Windows commands, the lab is optional. There is nothing to turn in, but you are responsible for the content of the lab on quizzes and exams. If there are any steps you are unable to complete, ask for help!.

  1. Create a directory named \ctemp to use in exercises. Use C: or H: or whatever is handy.

  2. Create subdirectories in the \ctemp directory.

  3. Create files in all the directories. Use the ECHO command with redirection.

  4. Confirm that the files you create exist with the dir command.

  5. Verify the contents of the files you create with the type command.

  6. Using your \ctemp directory tree, use the various forms of chdir (which can be abbreviated cd:
    cd ..\name
    cd ..\..
    

  7. Make your \ctemp directory the current directory.

  8. List all the *.exe files in the C:\WINDOWS directory.

  9. Copy all these files to your \ctemp directory.

    Hint: Remember the * wild card!

  10. Erase one of your subdirectories. What happens?

  11. See if there are any BAT files (files with extension .BAT) in the C:\WINDOWS directory tree. Use the command:
    dir c:\windows\*.bat /s
    
    The "/s" option means recurse all subdirectories.

  12. View (using type or NOTEPAD or other command) one of the BAT files.

  13. Make your \ctemp directory the current directory. Move a file from it to one of the subdirectories.

  14. Change the name of a file in this directory using RENAME.

  15. Try using RENAME to change the name of a file to a different directory like:
    rename file dir1\newfile
    
    What happens?