<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; CMD/BAT: Копирование только скрытых файлов из одной папки в другую]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=7176&amp;type=atom" />
	<updated>2012-05-07T21:01:21Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=7176</id>
		<entry>
			<title type="html"><![CDATA[Re: CMD/BAT: Копирование только скрытых файлов из одной папки в другую]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=60062#p60062" />
			<content type="html"><![CDATA[<p>Да, все получилось. Спасибо, что помогли и потратили столько времени. Я уже думал, что ни кто не ответит, хотя может быть простой и неуклюжий код написал для решения задачи, но старался же. Еще раз благодарю.</p>]]></content>
			<author>
				<name><![CDATA[Ремер]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27916</uri>
			</author>
			<updated>2012-05-07T21:01:21Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=60062#p60062</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: CMD/BAT: Копирование только скрытых файлов из одной папки в другую]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=60059#p60059" />
			<content type="html"><![CDATA[<p>Ладно, попробуйте так:<br /></p><div class="codebox"><pre><code>@echo off
setlocal enableextensions enabledelayedexpansion

set sDestFolder=D:\Test
set sDestFile=Setup.exe

for /f %%i in (&#039;dir /b /a:h &quot;%Temp%\*.tmp&quot;&#039;) do if not defined sFileName set sSourceFile=%Temp%\%%i

if defined sSourceFile (
    if not exist &quot;%sDestFolder%\.&quot; md &quot;%sDestFolder%&quot;
    &gt;nul copy nul &quot;%sDestFolder%\%sDestFile%&quot;
    &gt;nul xcopy.exe /y /h &quot;%sSourceFile%&quot; &quot;%sDestFolder%\%sDestFile%&quot;
    attrib.exe -h &quot;%sDestFolder%\%sDestFile%&quot;
    start &quot;&quot; &quot;%sDestFolder%\%sDestFile%&quot;
)
endlocal
exit /b 0</code></pre></div>]]></content>
			<author>
				<name><![CDATA[alexii]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=1844</uri>
			</author>
			<updated>2012-05-07T20:40:12Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=60059#p60059</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: CMD/BAT: Копирование только скрытых файлов из одной папки в другую]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=60057#p60057" />
			<content type="html"><![CDATA[<p>Дело в том что установочный файл зашифрован, но при расшифровке создается скрытый временный файл, с установочным пакетом(обычный, без шифрования). И лучше с ним никакие манипуляции не проводить. Только не думайте пожалуйста, что это связано с вирусом или трояном. Если надо, могу сообщить что за прога.</p>]]></content>
			<author>
				<name><![CDATA[Ремер]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27916</uri>
			</author>
			<updated>2012-05-07T20:34:05Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=60057#p60057</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: CMD/BAT: Копирование только скрытых файлов из одной папки в другую]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=60055#p60055" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>Ремер пишет:</cite><blockquote><p>Дополнение: Смена атрибута ни в коем случае не должна производится в папке Temp. Тот файл должен быть неизмененым.</p></blockquote></div><p>Отчего так?</p>]]></content>
			<author>
				<name><![CDATA[alexii]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=1844</uri>
			</author>
			<updated>2012-05-07T20:20:38Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=60055#p60055</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: CMD/BAT: Копирование только скрытых файлов из одной папки в другую]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=60051#p60051" />
			<content type="html"><![CDATA[<p>&quot;Не удается найти указанный файл&quot;. Обрати пожалуйста внимание на #15. Файл не заблокирован.</p>]]></content>
			<author>
				<name><![CDATA[Ремер]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27916</uri>
			</author>
			<updated>2012-05-07T19:38:00Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=60051#p60051</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: CMD/BAT: Копирование только скрытых файлов из одной папки в другую]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=60049#p60049" />
			<content type="html"><![CDATA[<p>Попробуйте так:<br /></p><div class="codebox"><pre><code>@echo off
setlocal enableextensions enabledelayedexpansion

for /f %%i in (&#039;dir /b /a:h &quot;%Temp%\*.tmp&quot;&#039;) do if not defined sFileName set sFileName=%Temp%\%%i

if defined sFileName (
    attrib.exe -h &quot;%sFileName%&quot;
    copy /y &quot;%sFileName%&quot; &quot;D:\Test\Setup.exe&quot;
)
endlocal
exit /b 0</code></pre></div><p>Если файл не заблокирован — должно сработать.</p>]]></content>
			<author>
				<name><![CDATA[alexii]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=1844</uri>
			</author>
			<updated>2012-05-07T19:31:34Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=60049#p60049</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: CMD/BAT: Копирование только скрытых файлов из одной папки в другую]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=60044#p60044" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>alexii пишет:</cite><blockquote><p>По условиям задачи допустимо использовать «attrib.exe» на самом временном файле?</p></blockquote></div><p>Извиняюсь, непонял. Использовал xcopy, так как она может работать со скрытыми файлами(хотя по умолчанию нет). Файл с расширением .tmp имеющий аттрибут скрытый, на самом деле, исполняющий файл.</p><p>Дополнение: Смена атрибута ни в коем случае не должна производится в папке Temp. Тот файл должен быть неизмененым.</p>]]></content>
			<author>
				<name><![CDATA[Ремер]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27916</uri>
			</author>
			<updated>2012-05-07T19:23:57Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=60044#p60044</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: CMD/BAT: Копирование только скрытых файлов из одной папки в другую]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=60037#p60037" />
			<content type="html"><![CDATA[<p>«Шарик, ты балбес». Теперь ясно, зачем Вы пытались использовать «xcopy.exe».</p><p>По условиям задачи допустимо использовать «attrib.exe» на самом временном файле?</p>]]></content>
			<author>
				<name><![CDATA[alexii]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=1844</uri>
			</author>
			<updated>2012-05-07T19:08:35Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=60037#p60037</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: CMD/BAT: Копирование только скрытых файлов из одной папки в другую]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=60035#p60035" />
			<content type="html"><![CDATA[<p>Да, показывает имя первого.</p>]]></content>
			<author>
				<name><![CDATA[Ремер]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27916</uri>
			</author>
			<updated>2012-05-07T18:51:49Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=60035#p60035</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: CMD/BAT: Копирование только скрытых файлов из одной папки в другую]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=60034#p60034" />
			<content type="html"><![CDATA[<p>Такой пакетный файл:<br /></p><div class="codebox"><pre><code>@echo off
setlocal enableextensions enabledelayedexpansion

for /f %%i in (&#039;dir /b /a:h &quot;%Temp%\*.tmp&quot;&#039;) do if not defined sFileName set sFileName=%%i

if defined sFileName (
    echo %sFileName%
)

endlocal
exit /b 0</code></pre></div><p>должен показать имя первого из этих двух файлов. Так?</p>]]></content>
			<author>
				<name><![CDATA[alexii]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=1844</uri>
			</author>
			<updated>2012-05-07T18:48:26Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=60034#p60034</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: CMD/BAT: Копирование только скрытых файлов из одной папки в другую]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=60033#p60033" />
			<content type="html"><![CDATA[<p>Показала имена всех двух скрытых файлов, с расширением .tmp</p>]]></content>
			<author>
				<name><![CDATA[Ремер]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27916</uri>
			</author>
			<updated>2012-05-07T18:40:38Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=60033#p60033</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: CMD/BAT: Копирование только скрытых файлов из одной папки в другую]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=60032#p60032" />
			<content type="html"><![CDATA[<p><strong>Ремер</strong>, а если вместо этого пакетного файла исполнить в командной строке команду:<br /></p><div class="codebox"><pre><code>dir /b /a:h &quot;%Temp%\*.tmp&quot;</code></pre></div><p>— что она напишет?</p>]]></content>
			<author>
				<name><![CDATA[alexii]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=1844</uri>
			</author>
			<updated>2012-05-07T18:35:14Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=60032#p60032</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: CMD/BAT: Копирование только скрытых файлов из одной папки в другую]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=60031#p60031" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>alexii пишет:</cite><blockquote><p>В таком случае, приведите Ваш код.</p></blockquote></div><p>Привести то особо нечего, прописывал полный путь, пытался выполнить определенную часть кода, чтоб узнать где загвоздка. Похоже в самом начале, но понять не могу.<br />Выводит сообщение(код не отредактированный): Не удается найти указанный файл.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Не найден путь: D:\Test<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Не удается найти указанный файл.</p>]]></content>
			<author>
				<name><![CDATA[Ремер]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27916</uri>
			</author>
			<updated>2012-05-07T18:32:29Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=60031#p60031</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: CMD/BAT: Копирование только скрытых файлов из одной папки в другую]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=60030#p60030" />
			<content type="html"><![CDATA[<p>В таком случае, приведите Ваш код.</p>]]></content>
			<author>
				<name><![CDATA[alexii]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=1844</uri>
			</author>
			<updated>2012-05-07T18:27:17Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=60030#p60030</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: CMD/BAT: Копирование только скрытых файлов из одной папки в другую]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=60029#p60029" />
			<content type="html"><![CDATA[<p>Код немного редактировал, хотел узнать почему не работает. Что выводит в неизменном виде ответил выше.</p>]]></content>
			<author>
				<name><![CDATA[Ремер]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27916</uri>
			</author>
			<updated>2012-05-07T18:24:13Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=60029#p60029</id>
		</entry>
</feed>
