Question Locked

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

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

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

2 replies

by senhu

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.

This discussion is closed to new replies.