Saved Bookmarks
| 1. |
Solve : Stop searching after file is found? |
|
Answer» How could I make my batch stop LOOKING for a file once it has found it? Why stop the search after one find?Because it's time consuming. Quote If the file is dangerous all copies should be found.Yes. With an actual malware utility dangerous files can be found. However since they are USING a batch file they probably aren't trying to write their own malware scanner, because that would be foolish. Additionally, they make no implication that they are, or that the file's they are trying to find are "dangerous". EDIT: GUESS I may as well ADDRESS the Original Post you'd would need to not use del /s; instead you would basically need to roll your own routine and search for files yourself. I think maybe FORFILES or a for switch could be used for that. (for /f perhaps) something like this would do it... set filename=find this file.txt for /f "delims=" %%F in ('dir /b /s "%filename%"') do ( del "%%F" goto jump ) :jump echo done I see Billfish is still around... Quote from: Salmon Trout on March 14, 2011, 02:20:22 PM something like this would do it... Wow thank you so much! Works perfectly |
|