<?xml version='1.0' encoding="utf-8"?>
      <rss version='2.0'>
      <channel>
      <title>Форум на Исходниках.RU</title>
      <link>https://forum.sources.ru</link>
      <description>Форум на Исходниках.RU</description>
      <generator>Форум на Исходниках.RU</generator>
  	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=411633&amp;view=findpost&amp;p=3751965</guid>
        <pubDate>Fri, 01 Dec 2017 21:05:00 +0000</pubDate>
        <title>Удаление файлов из нулей</title>
        <link>https://forum.sources.ru/index.php?showtopic=411633&amp;view=findpost&amp;p=3751965</link>
        <description><![CDATA[Jin X: В 16-ричном виде вывести как-то можно попробовать и анализировать содержимое вывода, но это всё будет весьма тормознуто... <br>
<br>
<span class="tag-color tag-color-named" data-value="mergepost" style="color: mergepost"><span class='tag-size' data-value='7' style='font-size:7pt;'>Добавлено <time class="tag-mergetime" datetime="2017-12-02T00:06:27+03:00">01.12.17, 21:06</time></span></span><br>
Как и всё, что делается через BAT-ники  :tong:]]></description>
        <author>Jin X</author>
        <category>Пакетные файлы CMD, BAT</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=411633&amp;view=findpost&amp;p=3750194</guid>
        <pubDate>Mon, 20 Nov 2017 16:16:33 +0000</pubDate>
        <title>Удаление файлов из нулей</title>
        <link>https://forum.sources.ru/index.php?showtopic=411633&amp;view=findpost&amp;p=3750194</link>
        <description><![CDATA[Славян: Блин, а если тот контроллер один каталог запорол, то чем проверить конкретно его и поправить ошибки, а не весь диск (сотни гиг) chkdsk&#39;ой проверять? :wall:]]></description>
        <author>Славян</author>
        <category>Пакетные файлы CMD, BAT</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=411633&amp;view=findpost&amp;p=3750127</guid>
        <pubDate>Mon, 20 Nov 2017 06:22:57 +0000</pubDate>
        <title>Удаление файлов из нулей</title>
        <link>https://forum.sources.ru/index.php?showtopic=411633&amp;view=findpost&amp;p=3750127</link>
        <description><![CDATA[^D^ima: <div class='tag-quote'><a class='tag-quote-link' href='https://forum.sources.ru/index.php?showtopic=411633&view=findpost&p=3750092'><span class='tag-quote-prefix'>Цитата</span></a> <span class='tag-quote__quote-info'>Славян &#064; <time class="tag-quote__quoted-time" datetime="2017-11-19T12:46:16+00:00">19.11.17, 12:46</time></span><div class='quote '> состоящие только из дв.нулей</div></div><br>
Может быть у них какой-то хеш брать или другой функцией сворачивать? <br>
На PS можно попробовать, он более пригоден для этого чем голый <div class='tag-quote'><a class='tag-quote-link' href='https://forum.sources.ru/index.php?showtopic=411633&view=findpost&p=3750092'><span class='tag-quote-prefix'>Цитата</span></a> <span class='tag-quote__quote-info'>Славян &#064; <time class="tag-quote__quoted-time" datetime="2017-11-19T12:46:16+00:00">19.11.17, 12:46</time></span><div class='quote '>BAT-ничек</div></div>]]></description>
        <author>^D^ima</author>
        <category>Пакетные файлы CMD, BAT</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=411633&amp;view=findpost&amp;p=3750120</guid>
        <pubDate>Mon, 20 Nov 2017 01:22:27 +0000</pubDate>
        <title>Удаление файлов из нулей</title>
        <link>https://forum.sources.ru/index.php?showtopic=411633&amp;view=findpost&amp;p=3750120</link>
        <description><![CDATA[Qraizer: Типа того:<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">#include &#60;windows.h&#62;</div><div class="code_line">#include &#60;iterator&#62;</div><div class="code_line">#include &#60;algorithm&#62;</div><div class="code_line">#include &#60;fstream&#62;</div><div class="code_line">#include &#60;vector&#62;</div><div class="code_line">#include &#60;string&#62;</div><div class="code_line">&nbsp;</div><div class="code_line">void process(std::string path, std::vector&#60;std::string&#62;&amp; toDel)</div><div class="code_line">{</div><div class="code_line">&nbsp;&nbsp;static const std::string curDir(1, &#39;.&#39;);</div><div class="code_line">&nbsp;&nbsp;static const std::string predDir(&quot;..&quot;);</div><div class="code_line">&nbsp;&nbsp;WIN32_FIND_DATA &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;findData;</div><div class="code_line">&nbsp;&nbsp;HANDLE &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fHandle;</div><div class="code_line">&nbsp;&nbsp;std::string &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;dir = path+=&#39;\&#39;;</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp;path += &quot;*.*&quot;;</div><div class="code_line">&nbsp;&nbsp;if ((fHandle = FindFirstFile(path.c_str(), &amp;findData)) != INVALID_HANDLE_VALUE)</div><div class="code_line">&nbsp;&nbsp;{</div><div class="code_line">&nbsp;&nbsp; &nbsp;do</div><div class="code_line">&nbsp;&nbsp; &nbsp;{</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;if ((findData.dwFileAttributes &amp; (FILE_ATTRIBUTE_TEMPORARY |</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;FILE_ATTRIBUTE_OFFLINE)) != 0) continue;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;if ((findData.dwFileAttributes &amp; FILE_ATTRIBUTE_DIRECTORY) != 0)</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;{</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;if (findData.cFileName == curDir || findData.cFileName == predDir) continue;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;process(dir + findData.cFileName, toDel);</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;continue;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;}</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;if ((findData.dwFileAttributes &amp; FILE_ATTRIBUTE_REPARSE_POINT) != 0)</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;{</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;/* Тут обработка линков. Тебе виднее, что с ними делать. */</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;}</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;std::ifstream inFile((dir + findData.cFileName).c_str(), std::ios::binary);</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;if (std::find_if(std::istream_iterator&#60;unsigned char&#62;(inFile),</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; std::istream_iterator&#60;unsigned char&#62;(),</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [](unsigned char ch) { return ch != 0; }) == std::istream_iterator&#60;unsigned char&#62;())</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;toDel.push_back(dir + findData.cFileName);</div><div class="code_line">&nbsp;&nbsp; &nbsp;}</div><div class="code_line">&nbsp;&nbsp; &nbsp;while (FindNextFile(fHandle, &amp;findData) != 0);</div><div class="code_line">&nbsp;&nbsp; &nbsp;FindClose(fHandle);</div><div class="code_line">&nbsp;&nbsp;}</div><div class="code_line">}</div><div class="code_line">&nbsp;</div><div class="code_line">int main(int argn, char *argc[])</div><div class="code_line">{</div><div class="code_line">&nbsp;&nbsp;std::vector&#60;std::string&#62; zeroedFiles;</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp;std::for_each(argc+1, argc + argn, [&amp;](const char* arg) { process(arg, zeroedFiles); });</div><div class="code_line">&nbsp;&nbsp;for (auto i: zeroedFiles) /* DeleteFile(i) */;</div><div class="code_line">}</div></ol></div></div></div></div><script>preloadCodeButtons('1');</script>]]></description>
        <author>Qraizer</author>
        <category>Пакетные файлы CMD, BAT</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=411633&amp;view=findpost&amp;p=3750119</guid>
        <pubDate>Mon, 20 Nov 2017 00:53:12 +0000</pubDate>
        <title>Удаление файлов из нулей</title>
        <link>https://forum.sources.ru/index.php?showtopic=411633&amp;view=findpost&amp;p=3750119</link>
        <description><![CDATA[Славян: да это я понимаю. На гемор с обходом много потрачу. Ладно, не беспокойтесь&#33;]]></description>
        <author>Славян</author>
        <category>Пакетные файлы CMD, BAT</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=411633&amp;view=findpost&amp;p=3750118</guid>
        <pubDate>Mon, 20 Nov 2017 00:44:50 +0000</pubDate>
        <title>Удаление файлов из нулей</title>
        <link>https://forum.sources.ru/index.php?showtopic=411633&amp;view=findpost&amp;p=3750118</link>
        <description><![CDATA[Qraizer: На Плюсах за 5 минут пишется, <strong class='tag-b'>Славян</strong>. <br>
<br>
<span class="tag-color tag-color-named" data-value="mergepost" style="color: mergepost"><span class='tag-size' data-value='7' style='font-size:7pt;'>Добавлено <time class="tag-mergetime" datetime="2017-11-20T00:45:12+00:00">20.11.17, 00:45</time></span></span><br>
И ещё 5 обход дерева каталогов.]]></description>
        <author>Qraizer</author>
        <category>Пакетные файлы CMD, BAT</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=411633&amp;view=findpost&amp;p=3750101</guid>
        <pubDate>Sun, 19 Nov 2017 18:33:19 +0000</pubDate>
        <title>Удаление файлов из нулей</title>
        <link>https://forum.sources.ru/index.php?showtopic=411633&amp;view=findpost&amp;p=3750101</link>
        <description><![CDATA[Славян: Ясно. Ладно, напишем ручками на Си. :oops:]]></description>
        <author>Славян</author>
        <category>Пакетные файлы CMD, BAT</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=411633&amp;view=findpost&amp;p=3750095</guid>
        <pubDate>Sun, 19 Nov 2017 17:10:43 +0000</pubDate>
        <title>Удаление файлов из нулей</title>
        <link>https://forum.sources.ru/index.php?showtopic=411633&amp;view=findpost&amp;p=3750095</link>
        <description><![CDATA[amk: <div class='tag-quote'><a class='tag-quote-link' href='https://forum.sources.ru/index.php?showtopic=411633&view=findpost&p=3750092'><span class='tag-quote-prefix'>Цитата</span></a> <span class='tag-quote__quote-info'>Славян &#064; <time class="tag-quote__quoted-time" datetime="2017-11-19T12:46:16+00:00">19.11.17, 12:46</time></span><div class='quote '>в этих &quot;пакетных средствах&quot; не реализован анализ двоичной внутренности файла?</div></div> В них вообще не предусмотрен какой-либо анализ внутренностей. По текстовым файлам можно пробежаться целиком (построчно), да и то, если они в кодировке ОЕМ, и в них некоторые символы не встречаются.]]></description>
        <author>amk</author>
        <category>Пакетные файлы CMD, BAT</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=411633&amp;view=findpost&amp;p=3750092</guid>
        <pubDate>Sun, 19 Nov 2017 12:46:16 +0000</pubDate>
        <title>Удаление файлов из нулей</title>
        <link>https://forum.sources.ru/index.php?showtopic=411633&amp;view=findpost&amp;p=3750092</link>
        <description><![CDATA[Славян: Допустим, контроллер начудил и в куче файлов вместо данных записались двоичные нули.<br>Можно ли написать какой-то BAT-ничек, кой пробежался бы по каталогу (и всем подкаталогам, само собой), и все файлы, состоящие только из дв.нулей, поудалял бы?<br>П.С. или же в этих &quot;пакетных средствах&quot; не реализован анализ двоичной внутренности файла?]]></description>
        <author>Славян</author>
        <category>Пакетные файлы CMD, BAT</category>
      </item>
	
      </channel>
      </rss>
	