Docsity

DOS Commands for CS112: Intro to Programming, Slides of C programming

Partial preview of the text

Download DOS Commands for CS112: Intro to Programming and more Slides C programming in PDF only on Docsity!

CS112 – Intro to Programming

Windows: Basic DOS Commands

  • CD - Changes (switches directories)
  • Usage: cd [path]
  • MD – Creates a new directory
  • RMDIR – Deletes a directory
  • Example:
  • C:\DOCUME~1\PPP> cd C:\DOCUME~1\PPP
  • C:\DOCUME~1\PPP> cd ..
  • C:\DOCUME~1> *cd *
  • C:> md temp
  • C:> cd temp
  • C:\TEMP> cd ..
  • C:> rmdir temp
  • HELP – Displays help info
  • CLS - Clears the screen
  • DIR – Displays the list of files and subdirectories in a directory
  • EXIT – Quits the command interpreter
  • TYPE – Displays the contents of a file
  • MORE – Displays output one screen at a time
  • EDIT - Editor
  • Example:
  • C:> help cd
  • C:> help
  • C:> help more | more
  • C:> edit a.txt
  • C:> more a.txt
  • C:> *dir .mp
  • ECHO – Displays messages
  • COPY – Copies files to another location
  • RENAME – Renames a file or directory
  • DEL – Deletes a file
  • MOVE – Moves files, renames directories
  • Example:
  • C:> echo Hello, World!
  • Hello, World!
  • C:> copy A:\High_Hopes.mp3 D:\Music\Time.mp
  • C:> rename High_Hopes.mp3 brain_damage.mp
  • C:> del brain_damage.mp
  • C:> move temp1 temp
  • C:> *move Keep_Talking.mp3 D:\Music*