Dr. Mark Humphrys

School of Computing. Dublin City University.

Online coding site: Ancient Brain

coders   JavaScript worlds

Search:

Free AI exercises


Windows command line

The Windows command line (or DOS command-line) on Microsoft Windows also has commands you can type at a prompt.




Getting started

  1. Search/Run - cmd

  2. cls (like UNIX clear)

  3. dir

  4. cd (works like in UNIX)
     
    cd C:\ 
    cd \
    

  5. cd (with no argument) (is like UNIX pwd)

  

Install Shakespeare on C drive




Commands and wildcards

  1. Go to Shakespeare:
     cd \shakespeare 

  2. find (like grep)
    find "Henry" home.html
    


Wildcards

  1. File wildcards work. Go into "richardii" and try:
    find "Ireland" *.html
    
    Lists all files plus matches. Lists files even if they have no matches.

  2. Some directory wildcards work.
    From the home Shakespeare directory:
    cd macb*
    

  3. Some directory wildcards don't work.
    From the home Shakespeare directory, this works:
    find "Ireland" richardii\*.html
    
    but this does not work:
    find "Ireland" *\*.html
    
  4. You can get around this by writing a batch file with a FOR loop.




Misc

  1. Case insensitive
  2. Up-arrow - history
  3. Ctrl-C - interrupt command-line program

  4. Select - Copy
  5. Right-click - Paste



Customisation




Reference



ancientbrain.com      w2mind.org      humphrysfamilytree.com

On the Internet since 1987.      New 250 G VPS server.

Note: Links on this site to user-generated content like Wikipedia are highlighted in red as possibly unreliable. My view is that such links are highly useful but flawed.