DOS

17
DOS

description

DOS. Wildcards. Wildcards are characters that can be used to stand-in for unknown characters in file names. There are two wildcards in DOS: * = matches up with any combination of allowable characters ? = matches up with any single allowable character. - PowerPoint PPT Presentation

Transcript of DOS

Page 1: DOS

DOS

Page 2: DOS

Wildcards

• Wildcards are characters that can be used to stand-in for unknown characters in file names.

• There are two wildcards in DOS:

* = matches up with any combination of allowable characters

? = matches up with any single allowable character

Page 3: DOS

The asterisk character, *, can stand in for any number of characters. Some

examples of this command:

c:\>del *.doc

This command would delete every file with the doc extension from the root directory of C: . So files like myfile.doc, testfile.doc, and 123.doc would all be deleted.

Page 4: DOS

C:\>copy ab*.txt a:

This command would copy every file that began with ab, and had an extension of txt, to the floppy drive A: . So files like abstract.txt, abalone.txt, and abba.txt would all be copied.

C:\temp\>del *.*

This is the fastest way to clean out a directory. This command will delete every file in the directory C:\temp\. The first apostrophe covers every filename, and the second one covers every extension.

Page 5: DOS

The question mark wildcard, ?, stands in for any single character. Some

examples of this command:

C:\>del ?.doc

This command would only delete files that had a single character filename and a doc extension from the root directory. So a file like a.doc or 1.doc is history, but a file like io.doc is perfectly safe, since it has two characters.

Page 6: DOS

C:\>copy ab?.txt a:

• This command would copy any file with a three-letter name, of which the first two letters were ab, and with a txt extension, to the floppy drive A: . So files like abz.txt and ab2.txt would be copied.

Page 7: DOS

C:\temp\>del *ab?.do?

• This command would be very selective. It would look in the temp directory for files that had anywhere from 1 to 5 beginning characters, followed by ab followed by one character, and which had an extension of do followed by any one character. It would then delete any such files as matched. Examples of matching files would be itab3.dox, mearabt.doq, and 123abc.doc. But the file allabon.doc would not be deleted because it does not match. It has two characters following the letters ab in the filename, and the command specified one character in that position.

Page 8: DOS
Page 10: DOS

File system commands

• it includes a number of built-in commands for working with files.

– DIR – Lists the files in the current directory CD,

CHDIR • Changes the current working directory or displays

the current directory.

Page 11: DOS

COPY – Copies one file to another (if the destination file

already exists, MS-DOS asks whether to replace it). (See also XCOPY, an external command that could also copy directory trees)

• REN, RENAME – Renames a file or directory

– DEL, ERASE • Deletes a file. When used on a directory,

deletes all files in that directory, but does not recurse or delete the directory itself.

Page 12: DOS

• MD, MKDIR – Creates a new directory

• RD, RMDIR – Removes an empty directory

• VOL – Shows information about a volume

• VERIFY – Enable or disable verification of writing for files

• TYPE – Display the content of a file on the console

• BREAK – Controls the handling of program interruption with

Ctrl+C or Ctrl+Break.• CLS 

– Clears the screen.

Page 13: DOS

• DATE – Display and/or set the date of the system.

• ECHO – Toggles whether text is displayed (ECHO ON)

or not (ECHO OFF). Also displays text on the screen (ECHO text).

• TIME – Display and/or set the time of the system. )– VER 

• Displays the version of the operating system.

Page 14: DOS

• the kernel is the central component of most computer operating systems. Its responsibilities include managing the system's resources (the communication between hardware and software components).[1] As a basic component of an operating system, a kernel provides the lowest-level abstraction layer for the resources (especially memory, processors and I/O devices) that application software must control to perform its function. It typically makes these facilities available to application processes through inter-process communication mechanisms and system calls.

Page 15: DOS

Wildcards

• Wildcards are characters that can be used to stand-in for unknown characters in file names

Page 16: DOS
Page 17: DOS