Download presentation
Presentation is loading. Please wait.
1
Windows XP Desktop
2
Open DOS Command Window
7
An Alternative Way
12
DOS (console) Window
13
Change Drives To change to another disk drive, key in the drive letter ( ‘A’, ‘C’, ‘D’, etc) followed by a colon (‘:’) then press the key.
14
Change Drives The DOS Prompt should now look like the following. Drive A: is now the current default drive.
15
The DIR Command We have a directory full of disk files We have a directory full of disk files How do we look at what is on the disk or what files are in a directory? How do we look at what is on the disk or what files are in a directory? What is a directory anyway? What is a directory anyway? Use the DIR command Use the DIR command
16
Entering the DIR Command
17
/? To Get Help on the DIR Command
18
DIR Command At the top At the top Volume label Volume label serial number serial number drive (and directories) drive (and directories)
19
The DIR Command Shows For each file file name file extension file size (in bytes) file date (created or last modified) file time (created or last modified) at the bottom at the bottom # of files # of files bytes used bytes used # of directories # of directories bytes available bytes available
20
DIR Command Options /P pause after displaying a page /P pause after displaying a page /W display ‘wide’ (five files per column) /W display ‘wide’ (five files per column) /X includes short filenames /X includes short filenames Change Sort Order Change Sort Order /O - alpha by main file name then extension /O - alpha by main file name then extension /ON - alpha by main file name /ON - alpha by main file name /OE - alpha by extension /OE - alpha by extension /OEN - alpha by extension, then main name /OEN - alpha by extension, then main name /OD - by date and time /OD - by date and time /OS - by size /OS - by size Alternate format /O:S Alternate format /O:S
21
EXAMPLES Insert your DATADISK in drive A Insert your DATADISK in drive A List all files alphabetically by file name List all files alphabetically by file name Find the smallest file Find the smallest file Find the oldest file Find the oldest file How many files have an “.LST” extension How many files have an “.LST” extension How many files are there on the disk How many files are there on the disk How many files have 1~299 bytes (size) How many files have 1~299 bytes (size) How many files do not have an extension How many files do not have an extension
22
A note on the order switch You can reverse the order of the optional parameter of the ‘sort order’ switch (pg 48). You can reverse the order of the optional parameter of the ‘sort order’ switch (pg 48). If you put a dash ‘-’ in front of the optional parameter, the order is reversed. If you put a dash ‘-’ in front of the optional parameter, the order is reversed. Examples: Examples: A:\>DIR /OE A:\>DIR /O-E A:\>DIR /OE A:\>DIR /O-E A:\>DIR /OS A:\>DIR /O-S A:\>DIR /OS A:\>DIR /O-S
23
wildcards and the DIR When you enter DIR you get all files in that directory listed for you. When you enter DIR you get all files in that directory listed for you. There are 2 wildcards that allow you to select the files to be listed There are 2 wildcards that allow you to select the files to be listed ?Replaces a single character ?Replaces a single character *replaces a number of characters *replaces a number of characters
24
The * wildcard DIR lists all files in that directory DIR lists all files in that directory DIR PA* lists all files starting with ‘PA’ DIR PA* lists all files starting with ‘PA’ DIR *T lists all files ending with an ‘T’ DIR *T lists all files ending with an ‘T’ DIR A*LS lists all files starting with an ‘A’ and ending with an ‘LS’ DIR A*LS lists all files starting with an ‘A’ and ending with an ‘LS’ DIR *.PPT lists all files with a.PPT extension DIR *.PPT lists all files with a.PPT extension DIR *T.* lists all files where the last letter of the file name (not the ext) is “T” DIR *T.* lists all files where the last letter of the file name (not the ext) is “T”
25
Using your DATADISK How many files start with a “P”? How many files start with a “P”? How many files have an extension of “XLS”? How many files have an extension of “XLS”? How many files have an extension that starts with “W”? How many files have an extension that starts with “W”? How many file names start with “INV”? How many file names start with “INV”? How many files have an “SU” somewhere in their file name (not extension)? How many files have an “SU” somewhere in their file name (not extension)?
26
The ? wildcard The ? replaces a single character The ? replaces a single character DIR PALETTE???.BMP lists all files that start with ‘PALETTE’, then any 3 characters, then ‘BMP’ DIR “PALETTE ??.BMP” lists all files starting with ‘Palette[space]’, then any 2 characters, then ‘BMP’. DIR “PALETTE ??.BMP” lists all files starting with ‘Palette[space]’, then any 2 characters, then ‘BMP’. What happens if you try it without the quotes? What happens if you try it without the quotes?
27
Using your DATADISK How many files have an “N” as the second letter of their file name? How many files have an “N” as the second letter of their file name? How many files have a 3 character extension that starts with “PP”? How many files have a 3 character extension that starts with “PP”? How many files have a “FT” in the 3 rd and 4 th letters? How many files have a “FT” in the 3 rd and 4 th letters?
28
Default Switches DOS saves important settings in a memory area called the DOS ENVIRONMENT DOS saves important settings in a memory area called the DOS ENVIRONMENT to see the environment, key in: A:\>SET to see the environment, key in: A:\>SET the env. variable for DIR is DIRCMD the env. variable for DIR is DIRCMD to change the settings, key in: to change the settings, key in: A:\SET ‘environment variable”=string to set DIR commands enter (example) A:\SET DIRCMD=/P/O to set DIR commands enter (example) A:\SET DIRCMD=/P/O now again, key in A:\>SET now again, key in A:\>SET
29
Attributes DIR /AH Hidden files DIR /AH Hidden files DIR /AR Read only DIR /AR Read only DIR /AS System files DIR /AS System files DIR /AA Archive files - not backed up DIR /AA Archive files - not backed up
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.