<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; VBS: Извлечь строки по списку]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=12460&amp;type=atom" />
	<updated>2017-02-17T13:54:57Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=12460</id>
		<entry>
			<title type="html"><![CDATA[Re: VBS: Извлечь строки по списку]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=112703#p112703" />
			<content type="html"><![CDATA[<p><strong>Flasher</strong>, великолепно. Ты, как всегда, лучший.</p>]]></content>
			<author>
				<name><![CDATA[Parazit]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=34289</uri>
			</author>
			<updated>2017-02-17T13:54:57Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=112703#p112703</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBS: Извлечь строки по списку]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=112701#p112701" />
			<content type="html"><![CDATA[<div class="quotebox"><blockquote><p><span style="color: green">&nbsp; &nbsp; If F &lt;&gt; &quot;&quot; And <strong>Not</strong> Dict.Exists(F) Then S = S &amp; vbCrLf &amp; F</span></p></blockquote></div>]]></content>
			<author>
				<name><![CDATA[Flasher]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27593</uri>
			</author>
			<updated>2017-02-17T13:51:36Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=112701#p112701</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBS: Извлечь строки по списку]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=112699#p112699" />
			<content type="html"><![CDATA[<p><strong>Flasher</strong>, задача немного изменилась.</p>]]></content>
			<author>
				<name><![CDATA[Parazit]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=34289</uri>
			</author>
			<updated>2017-02-17T13:46:14Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=112699#p112699</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBS: Извлечь строки по списку]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=112698#p112698" />
			<content type="html"><![CDATA[<p><span style="color: green">А мне точки в твоих предложениях.</span></p><div class="quotebox"><cite>Parazit пишет:</cite><blockquote><p>строки, которые <strong>присутствуют</strong></p></blockquote></div>]]></content>
			<author>
				<name><![CDATA[Flasher]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27593</uri>
			</author>
			<updated>2017-02-17T13:44:39Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=112698#p112698</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBS: Извлечь строки по списку]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=112696#p112696" />
			<content type="html"><![CDATA[<p><strong>Flasher</strong>, мне нужны различия.</p>]]></content>
			<author>
				<name><![CDATA[Parazit]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=34289</uri>
			</author>
			<updated>2017-02-17T13:40:01Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=112696#p112696</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBS: Извлечь строки по списку]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=112692#p112692" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>List1 = &quot;C:\Список1.txt&quot;
List2 = &quot;C:\Список2.txt&quot;
List3 = &quot;C:\Список_совпавших_строк.txt&quot;

Set Dict = CreateObject(&quot;Scripting.Dictionary&quot;)
Set FSO  = CreateObject(&quot;Scripting.FileSystemObject&quot;)

With FSO.OpenTextFile(List1)
  Do : F = Trim(.ReadLine)
    If F &lt;&gt; &quot;&quot; Then Dict.Add F, &quot;&quot;
  Loop Until .AtEndOfStream : .Close
End With

With FSO.OpenTextFile(List2)
  Do : F = Trim(.ReadLine)
    If F &lt;&gt; &quot;&quot; And Dict.Exists(F) Then S = S &amp; vbCrLf &amp; F
  Loop Until .AtEndOfStream : .Close
End With

If Not IsEmpty(S) Then FSO.CreateTextFile(List3, 1).Write Mid(S, 3)</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Flasher]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27593</uri>
			</author>
			<updated>2017-02-17T13:09:11Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=112692#p112692</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[VBS: Извлечь строки по списку]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=112688#p112688" />
			<content type="html"><![CDATA[<p>Привет. Такая задача.<br />Вот у меня есть файл <strong>C:\111.txt</strong>. В нём надо найти определённые строки, которые присутствуют в файле-списке <strong>C:\222.txt</strong>.<br />И вывести эти строки в файл <strong>C:\Output.txt</strong>.</p>]]></content>
			<author>
				<name><![CDATA[Parazit]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=34289</uri>
			</author>
			<updated>2017-02-17T11:34:03Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=112688#p112688</id>
		</entry>
</feed>
