Friday 10 October 2014

Working with a Command Box in Windows

Using the command box
Generally commands are typed into the command box using the keyboard and are executed once the  enter key (<-enter) is pressed
Change to drive letter and directory where image files are located
  • Type in single drive letter followed by a colon and press enter
    •   e.g.   d: (<-enter)
  • To change the current directory type cd (space) \users-tmp\2005-10-28 (<-enter)
  • In order to save typing
    • Open a MyComputer and browse to directory which contains files to be worked with
    • In the command box type CD (space) and drag the folder icon in the address bar to the Command Prompt box and them press enter.  The directory will change to the directory displayed in theMyComputer window

Working in the Command Box
  • DIR - list directory contents.
  • drive: - change drive letter. e.g. d: (<-enter)
  • CD - change directory e.g. go to top directory (root)  cd \  (Remember to be on the drive which contains the directory before doing cd )
  • MD - make a new directory
  • TYPE - list contents of text files. e.g. 2005-10-28.txt
  • MORE - pause text display after each screen page. e.g. dir | more
    • Scrolling will stop at one screen worth of text with.  Press space bar when   ---  More  --- appears to display subsequent pages
  • |  -  the vertical line know as a pipe re-directs screen output to another program. e.g. dir | more

Files specification and wild cards
  • ? - matches any single character
  • * - match any number of occurrences of any letter

More useful commands
  • XCOPY - copy files
  • REN - rename a file
  • ERASE / DEL - erase files
  • TREE  - list directory tree
  • HELP - command box help
  • PATH - lists directories which are searched to find programs which are not built into Windows

Getting help / hints

Aborting running programs
  • ctrl+C  (hold down the control key and press C)
  • ctrl+Break   (hold down the control key and press the Break key)
  • Use task manager (crtl+shift+escape) and kill the cmd.exe process

Finishing up
  • Type EXIT (<-enter) - command box will close
  • Or click on the X at the top right corner of the window