Help! Help! - Simple search and store results in 1 of 3 file
Posted: 11 Feb 2010 04:10
I would like to search for a missing windows file on the pc...
then depending on the result store the result in 2 of 3 files along with the computer name..
The process is;
search for file MSCOMC2.OCX...
store date and time of search and computer name and "File Found"(or "Not Found") result in a file called search.txt
and if the file was found store the same information in Filefound.txt
and if the file was not found store the same information in FileNotFound.txt
I would like to sepearte the results by commas in the text file... and I need to be able or the results to append to as many searches will be performed.
What I have so far is(not much);
echo %computername% >> results.txt
cd c:\
dir "MSCOMCT2.OCX" /s >> \\glkas0676\tm1data\results.txt REM BUT THIS GIVES ME THE COMPLETE RESULT NOT THE FOUND OR NOT FOUND.
Simon
then depending on the result store the result in 2 of 3 files along with the computer name..
The process is;
search for file MSCOMC2.OCX...
store date and time of search and computer name and "File Found"(or "Not Found") result in a file called search.txt
and if the file was found store the same information in Filefound.txt
and if the file was not found store the same information in FileNotFound.txt
I would like to sepearte the results by commas in the text file... and I need to be able or the results to append to as many searches will be performed.
What I have so far is(not much);
echo %computername% >> results.txt
cd c:\
dir "MSCOMCT2.OCX" /s >> \\glkas0676\tm1data\results.txt REM BUT THIS GIVES ME THE COMPLETE RESULT NOT THE FOUND OR NOT FOUND.
Simon