Is there a command to search removable drives (Windows/MS-DOS)

By anthony-b ·
I am creatng an ms-dos script to delete a repeated file that copies itself to any removable storage device that is plugged in. my question is: is there a command i can use so the delete command will remove a file on all drives so far the command is this:
del /f /s /a :r h s start.exe
The file i want to remove is the start.exe file
post back thanx

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Answers

Collapse -

Is there a command to search removable drives (Windows/MS-DOS)

by senhu In reply to Is there a command to sea ...

Let's say your removable drive is mounted at E. The following command in biterscripting (.com for free download) will find all files named startup.exe on that drive.

find -rn "startup.exe" "E:/"

biterscripting has a command prompt similar to MS DOS. It can be started from MS-DOS. It can also work in batch mode. It has a sleep command to do this repeatedly. And it can take wild characters for searching files. For example,

find -rn "*.exe" "E:/"

will find all executable files on E drive.

Related Discussions

Related Forums