chaos945
OSNN Senior Addict
- Joined
- 10 Feb 2003
- Messages
- 934
I'm trying to get this script to find the location of SPYBOTSD.exe on all available drives and then run it. Any suggestions would be helpfull!
Successfully I've gotten the script to search specified drives for the string spybot then output the findings, but I can't actually use the output as a variable. Also I've been experimenting with the FOR command but no luck as of yet.
/EDIT
I could actually get the script to find spybotsd.exe exactly and output the line number, but how would I tell the program to run it at that line?
Successfully I've gotten the script to search specified drives for the string spybot then output the findings, but I can't actually use the output as a variable. Also I've been experimenting with the FOR command but no luck as of yet.
/EDIT
I could actually get the script to find spybotsd.exe exactly and output the line number, but how would I tell the program to run it at that line?
Code:
@ECHO OFF
IF EXIST *OUT.TXT DEL *OUT.TXT
TREE /F c:>[C]OUT.TXT
TREE /F g:>[G]OUT.TXT
FIND /I /N "SPYBOT" [C]OUT.TXT
FIND /I /N "SPYBOT" [G]OUT.TXT
IF EXIST *OUT.TXT DEL *OUT.TXT
ECHO.
ECHO.
ECHO %ERRORLEVEL% ERRORS DURING PROCESS
PAUSE