<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Серый форум &mdash; CMD/BAT: вывести первые 5 строк txt-файла]]></title>
		<link>https://forum.script-coding.com/viewtopic.php?id=14270</link>
		<atom:link href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=14270&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «CMD/BAT: вывести первые 5 строк txt-файла».]]></description>
		<lastBuildDate>Sun, 21 Oct 2018 16:40:39 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: CMD/BAT: вывести первые 5 строк txt-файла]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=129342#p129342</link>
			<description><![CDATA[<div class="codebox"><pre><code>@echo off
setlocal enableextensions enabledelayedexpansion

set sSourceFile=C:\Мои проекты\0212\Source.txt
set /a iCount = 5

if exist &quot;%sSourceFile%&quot; (
	&lt;&quot;%sSourceFile%&quot; (
		for /l %%i in (1, 1, %iCount%) do (
			set sVar=
			&gt;nul set /p sVar=
			echo.!sVar!
		)
	)
) else (
	echo Can&#039;t find source file [%sSourceFile%].
	exit /b 1
)

endlocal
exit /b 0
</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (alexii)]]></author>
			<pubDate>Sun, 21 Oct 2018 16:40:39 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=129342#p129342</guid>
		</item>
		<item>
			<title><![CDATA[CMD/BAT: вывести первые 5 строк txt-файла]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=129341#p129341</link>
			<description><![CDATA[<p>НЕ могу выполнить задание. Суть заключается, как я уже писал в заголовке, в том, что нужно вывести первые 5 (или n) строк текстового файла, а результат выводился в командной строке. Помогите пожалуйста.</p>]]></description>
			<author><![CDATA[null@example.com (AmatarYI)]]></author>
			<pubDate>Sun, 21 Oct 2018 16:32:02 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=129341#p129341</guid>
		</item>
	</channel>
</rss>
