Presentation is loading. Please wait.

Presentation is loading. Please wait.

“DOS is dead, (long live the command line)“ Source for most of this material: –http://commandwindows.com.

Similar presentations


Presentation on theme: "“DOS is dead, (long live the command line)“ Source for most of this material: –http://commandwindows.com."— Presentation transcript:

1 “DOS is dead, (long live the command line)“ Source for most of this material: –http://commandwindows.com

2 DOS is Dead There is a common misconception that the command prompt in Windows XP is the same as DOS Even Microsoft itself isn't always careful about the distinction There are some superficial resemblances However, all remnants of DOS are totally gone from the Windows XP kernel (there is a DOS emulator to run legacy apps)

3 File System Hierarchy C:

4 Absolute Path to here? C:\windows\system32\drivers

5 C: Relative Path from Windows to Drivers? System32\drivers

6 C: Relative path from system to drivers?../system32/drivers

7 Internal Commands assoc dir move set break echo path setlocal call endlocal pause shift cd exit popd start cls for prompt time color ftype pushd title copy goto rd type date if rem verify del md ren volume

8 Common Usage Command [arguments] Command [switches] [path to file or folder] Command [switches] [path] [path]

9 Common Usage Examples: dir dir /w dir /w c:\windows dir /w /p..

10 Common Usage Examples: copy mydoc.doc c:\files move c:\docs\* c:\backups rename *.txt *.doc

11 Symbols used with commands SymbolFunctionExample > Sends output to a named file. If file does not exist, it creates one. Overwrites existing file command > somefile >> Appends output to contents of a named file or creates a file if none exists command >> somefile < Uses contents of a named file as input to a command command < somefile ¦ Sends ("pipes") the output of command1 to the input of command2 command1 ¦ command2 & Used to combine two commands. Executes command1 and then command2 command1 & command2 && A conditional combination. Executes command2 if command1 completes successfully command1 && command2 ¦¦ Command2 executes only if command1 does not complete successfully. command1 ¦¦ command2 @ Used in batch files at the beginning of a line to turn off the display of commands @echo off

12 Extended Usage Examples: dir c:\windows > windowsDirectoryList.txt dir | more echo. | date Del *.* < y.txt

13 Environmental Variables %username% %systemroot% SET command My Computer.Properties- >Advanced.Environmental Variables

14 Exercises What’s the absolute path of Temp? What’s the relative path from Temp to \ ? What’s the relative path from Pagemaker to Drivers? C:C:

15 Exercises On a floppy, create this directory structure using the command line. Create a.txt file in the pagemaker directory Copy and rename that file to the elements directory using only one command Write a batch script that will display the contents of A:\, and write those contents (the listing) to a file called C:\acontents.txt, and then attempt to format the floppy C:C:

16 Other resources http://www.microsoft.com/resources/docu mentation/windows/xp/all/proddocs/en- us/batch.mspx?mfr=truehttp://www.microsoft.com/resources/docu mentation/windows/xp/all/proddocs/en- us/batch.mspx?mfr=true


Download ppt "“DOS is dead, (long live the command line)“ Source for most of this material: –http://commandwindows.com."

Similar presentations


Ads by Google