Delete File Other Drive Searching a Particular Word With DOS

Searching a Particular Word or Group in a File

Through FIND command, you can search a word or a group of words.

Command    :                FIND
Type              :                Internal Command
Syntax          :                 FIND <Switch> “Stringˮ <File name> <enter>

Often, your need is to find a word in any file and check whether it is correctly written or not. FIND command is used to do this. FIND command is an external command and therefore to use it, first type FIND at the command prompt, then after leaving a blank space type that word or group of words in double quotation  Which is to be searched and then give path of that drive containing the file in which this word is to be searched and then type name of that file.
For example, if you want to find HELLO word in Doc.txt file, then give the following command:
find “HELLOˮ C:\dos\doc.txt <enter>

C:\dos\doc.txt <enter>

Some Switches are also used along with FIND command:

Switches Description

/C

This switch is used to show the number of that line where the word or group of words as given in command is found.

/V

Leaving the line of word or group of words you are searching and show all other lines.

Switch Result in Image blow:

find command hello :\

Deleting the File from other Drive or Directory

While working in a particular directory, to delete files of other drive, give path of the file to be deleted after the DEL command. For example, if you are working in the root directory of C Drive and want to delete file DOC.TXT from the FOLDER1 Directory of D Drive, then Command will be:
del d:\folder1\doc.txt <enter>

While working in a particular directory, to delete files of other drive, give path of the file to be deleted after the DEL command. For example, if you are working in the root directory of C Drive and want to delete file DOC.TXT from the FOLDER1 Directory of D Drive, then Command will be:
del d:\folder1\doc.txt <enter>

del command in  dos