<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; VBS: Создать из файлов в директории названия файлов в 2 разных]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=10889&amp;type=atom" />
	<updated>2015-09-03T13:34:51Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=10889</id>
		<entry>
			<title type="html"><![CDATA[Re: VBS: Создать из файлов в директории названия файлов в 2 разных]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=97051#p97051" />
			<content type="html"><![CDATA[<p>благодарю все работает)!</p>]]></content>
			<author>
				<name><![CDATA[shade45]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=33296</uri>
			</author>
			<updated>2015-09-03T13:34:51Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=97051#p97051</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBS: Создать из файлов в директории названия файлов в 2 разных]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=96766#p96766" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>Option Explicit
Const sSrcFolder = &quot;C:\Test\files&quot; &#039; папка, в которой лежат файлы
Const sStudentsFile = &quot;C:\Test\StudentsFile.txt&quot; &#039; файл, куда пишем имена
Const sGroupsFile = &quot;C:\Test\GroupsFile.txt&quot; &#039; файл, куда пишем группы
Const OutputFormat = -1 &#039; формат вывода 0 = ASCII, -1 = Unicode, -2 = System Default

Dim sStudents, sGroups, oFile, aParts
sStudents = &quot;&quot;
sGroups = &quot;&quot;
With CreateObject(&quot;Scripting.FileSystemObject&quot;)
    For Each oFile In .GetFolder(sSrcFolder).Files
        aParts = Split(.GetBaseName(oFile.Name))
        If UBound(aParts) = 1 Then
            sStudents = sStudents &amp; aParts(0) &amp; vbCrLf
            sGroups = sGroups &amp; aParts(1) &amp; vbCrLf
        End If
    Next
    With .OpenTextFile(sStudentsFile, 2, True, OutputFormat)
        .Write(sStudents)
        .Close
    End With
    With .OpenTextFile(sGroupsFile, 2, True, OutputFormat)
        .Write(sGroups)
        .Close
    End With
End With
CreateObject(&quot;WScript.Shell&quot;).PopUp &quot;Готово&quot;, 1, , 64</code></pre></div>]]></content>
			<author>
				<name><![CDATA[omegastripes]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=29228</uri>
			</author>
			<updated>2015-08-23T16:53:48Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=96766#p96766</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBS: Создать из файлов в директории названия файлов в 2 разных]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=96714#p96714" />
			<content type="html"><![CDATA[<p>С этим ещё понятно было. А вот что это за файлы, в которые нужно сохранять, в какой форме и с какими именами совсем неясно.</p>]]></content>
			<author>
				<name><![CDATA[Flasher]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27593</uri>
			</author>
			<updated>2015-08-21T15:41:25Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=96714#p96714</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBS: Создать из файлов в директории названия файлов в 2 разных]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=96712#p96712" />
			<content type="html"><![CDATA[<p>пример есть 10 файлов в папке с именем в формате - VasinPK VKR-007.txt, нужно чтобы имя (VasinPK ) сохранилось в 1 файл, а группу (VKR-007) в другой,</p>]]></content>
			<author>
				<name><![CDATA[shade45]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=33296</uri>
			</author>
			<updated>2015-08-21T15:29:18Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=96712#p96712</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBS: Создать из файлов в директории названия файлов в 2 разных]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=96706#p96706" />
			<content type="html"><![CDATA[<p>ТЗ - никудышное. Описывайте подробнее - было &quot;так&quot;, стало &quot;так&quot;.</p>]]></content>
			<author>
				<name><![CDATA[Flasher]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27593</uri>
			</author>
			<updated>2015-08-21T14:43:12Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=96706#p96706</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[VBS: Создать из файлов в директории названия файлов в 2 разных]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=96699#p96699" />
			<content type="html"><![CDATA[<p>В папке есть несколько файлов с именем группы пробел имя студента в названии, нужно чтобы группа сохранилась в 1 файл, а&nbsp; &nbsp;<br />имя студента в другой, подскажите как это можно реализовать...уже 3 день бьюсь(</p>]]></content>
			<author>
				<name><![CDATA[shade45]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=33296</uri>
			</author>
			<updated>2015-08-21T12:12:01Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=96699#p96699</id>
		</entry>
</feed>
