160 likes | 310 Views
“DOS is dead, (long live the command line)“. Source for most of this material: http://commandwindows.com. 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
E N D
“DOS is dead, (long live the command line)“ • Source for most of this material: • http://commandwindows.com
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)
C: File System Hierarchy
C: Absolute Path to here? C:\windows\system32\drivers
C: Relative Path from Windows to Drivers? System32\drivers
C: Relative path from system to drivers? ../system32/drivers
Common Usage Command [arguments] Command [switches] [path to file or folder] Command [switches] [path] [path]
Common Usage Examples: dir dir /w dir /w c:\windows dir /w /p ..
Common Usage Examples: copy mydoc.doc c:\files move c:\docs\* c:\backups rename *.txt *.doc
Extended Usage Examples: dir c:\windows > windowsDirectoryList.txt dir | more echo. | date Del *.* < y.txt
Environmental Variables • %username% • %systemroot% • SET command • My Computer.Properties->Advanced.Environmental Variables
C: 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: 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
Other resources • http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/batch.mspx?mfr=true