Aliyah
03-04-2004, 09:38 AM
Hi guys,
Need help. I have a list of files (post.txt) to be search
in temporary.log. Any ideas how can I pipe the output or
copied the output in the textfile. I created this
batchfile but it didn't work. I think missed something
please help.
for /f "tokens=*" %%a in (e:\temp\post.txt) do findstr /i %
%a e:\temp\temporary.log
thanks in advance.
Paul R. Sadowski
03-04-2004, 11:49 AM
"Aliyah" <anonymous@discussions.microsoft.com> wrote in message
news:3f5301c401cc$6e795ca0$a601280a@phx.gbl...
>
> for /f "tokens=*" %%a in (e:\temp\post.txt) do findstr /i %
> %a e:\temp\temporary.log
if EXIST e:\temp\myoutput.txt del e:\temp\myoutput.txt
for /f "tokens=*" %%a in (e:\temp\post.txt) do findstr /i %%a
e:\temp\temporary.log >> e:\temp\myoutput.txt
Paul R. Sadowski
03-04-2004, 11:49 AM
"Aliyah" <anonymous@discussions.microsoft.com> wrote in message
news:3f5301c401cc$6e795ca0$a601280a@phx.gbl...
>
> for /f "tokens=*" %%a in (e:\temp\post.txt) do findstr /i %
> %a e:\temp\temporary.log
if EXIST e:\temp\myoutput.txt del e:\temp\myoutput.txt
for /f "tokens=*" %%a in (e:\temp\post.txt) do findstr /i %%a
e:\temp\temporary.log >> e:\temp\myoutput.txt
Matthias Tacke
03-04-2004, 06:45 PM
"Aliyah" wrote:
>Hi guys,
>
>Need help. I have a list of files (post.txt) to be search
>in temporary.log. Any ideas how can I pipe the output or
>copied the output in the textfile. I created this
>batchfile but it didn't work. I think missed something
>please help.
>
>for /f "tokens=*" %%a in (e:\temp\post.txt) do findstr /i %
>%a e:\temp\temporary.log
>
>thanks in advance.
No need to loop with for. Use the /G: option of findstr. This should be
much faster and give a sorted result.
findstr /G:e:\temp\post.txt e:\temptemporaray.log
HTH
--
Greetings
Matthias________________________________________
For help on nt commands enter in a cmd window:
W2K>HH windows.chm::ntcmds.htm XP>HH ntcmds.chm
Matthias Tacke
03-04-2004, 06:45 PM
"Aliyah" wrote:
>Hi guys,
>
>Need help. I have a list of files (post.txt) to be search
>in temporary.log. Any ideas how can I pipe the output or
>copied the output in the textfile. I created this
>batchfile but it didn't work. I think missed something
>please help.
>
>for /f "tokens=*" %%a in (e:\temp\post.txt) do findstr /i %
>%a e:\temp\temporary.log
>
>thanks in advance.
No need to loop with for. Use the /G: option of findstr. This should be
much faster and give a sorted result.
findstr /G:e:\temp\post.txt e:\temptemporaray.log
HTH
--
Greetings
Matthias________________________________________
For help on nt commands enter in a cmd window:
W2K>HH windows.chm::ntcmds.htm XP>HH ntcmds.chm
Aliyah
03-05-2004, 06:27 AM
thanks all.
>-----Original Message-----
>"Aliyah" wrote:
>
>>Hi guys,
>>
>>Need help. I have a list of files (post.txt) to be search
>>in temporary.log. Any ideas how can I pipe the output or
>>copied the output in the textfile. I created this
>>batchfile but it didn't work. I think missed something
>>please help.
>>
>>for /f "tokens=*" %%a in (e:\temp\post.txt) do
findstr /i %
>>%a e:\temp\temporary.log
>>
>>thanks in advance.
>
>No need to loop with for. Use the /G: option of findstr.
This should be
>much faster and give a sorted result.
>
>findstr /G:e:\temp\post.txt e:\temptemporaray.log
>
>HTH
>--
>Greetings
>Matthias________________________________________
>For help on nt commands enter in a cmd window:
>W2K>HH windows.chm::ntcmds.htm XP>HH ntcmds.chm
>.
>
Aliyah
03-05-2004, 06:27 AM
thanks all.
>-----Original Message-----
>"Aliyah" wrote:
>
>>Hi guys,
>>
>>Need help. I have a list of files (post.txt) to be search
>>in temporary.log. Any ideas how can I pipe the output or
>>copied the output in the textfile. I created this
>>batchfile but it didn't work. I think missed something
>>please help.
>>
>>for /f "tokens=*" %%a in (e:\temp\post.txt) do
findstr /i %
>>%a e:\temp\temporary.log
>>
>>thanks in advance.
>
>No need to loop with for. Use the /G: option of findstr.
This should be
>much faster and give a sorted result.
>
>findstr /G:e:\temp\post.txt e:\temptemporaray.log
>
>HTH
>--
>Greetings
>Matthias________________________________________
>For help on nt commands enter in a cmd window:
>W2K>HH windows.chm::ntcmds.htm XP>HH ntcmds.chm
>.
>