<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; CMD/BAT: Простая автоматизация резервного копирования под Windows]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=8697&amp;type=atom" />
	<updated>2013-09-26T10:34:43Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=8697</id>
		<entry>
			<title type="html"><![CDATA[Re: CMD/BAT: Простая автоматизация резервного копирования под Windows]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=75567#p75567" />
			<content type="html"><![CDATA[<p><span style="color: Green"><strong>DD</strong>, без политики, пожалуйста.</span></p>]]></content>
			<author>
				<name><![CDATA[alexii]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=1844</uri>
			</author>
			<updated>2013-09-26T10:34:43Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=75567#p75567</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: CMD/BAT: Простая автоматизация резервного копирования под Windows]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=75563#p75563" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>DD пишет:</cite><blockquote><p>Подскажите, где в коде переменная на свежесозданный архив?</p></blockquote></div><p>В явном виде — нигде. Как я понимаю, имя файла архива задаётся выражением<br /></p><div class="codebox"><pre><code>files%DATE:~-4%-%DATE:~3,2%-%DATE:~0,2%_%TIME:~0,2%-%TIME:~3,2%-%TIME:~6,2%.7z</code></pre></div><p>значение которого зависит от текущих даты и времени.<br />Чтобы поймать его в переменную, попробуй заменить<br /></p><div class="codebox"><pre><code>C:\&quot;Program Files&quot;\7-Zip\7z.exe a -t7z -mhe=on &quot;%$DST%\files%DATE:~-4%-%DATE:~3,2%-%DATE:~0,2%_%TIME:~0,2%-%TIME:~3,2%-%TIME:~6,2%.7z&quot; @%$SRC% -scsWIN -p%$PSW% -mx=%$COMPR% -ssw -xr@%$EXC% &gt;&gt; log_7z.log</code></pre></div><p>на<br /></p><div class="codebox"><pre><code>
set ARCNAME=files%DATE:~-4%-%DATE:~3,2%-%DATE:~0,2%_%TIME:~0,2%-%TIME:~3,2%-%TIME:~6,2%.7z
C:\&quot;Program Files&quot;\7-Zip\7z.exe a -t7z -mhe=on &quot;%$DST%\%ARCNAME%&quot; @%$SRC% -scsWIN -p%$PSW% -mx=%$COMPR% -ssw -xr@%$EXC% &gt;&gt; log_7z.log
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Мальчик-гей]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=30832</uri>
			</author>
			<updated>2013-09-25T23:34:41Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=75563#p75563</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: CMD/BAT: Простая автоматизация резервного копирования под Windows]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=75552#p75552" />
			<content type="html"><![CDATA[<p>Всё есть, всё работает. Хочу лишь узнать, какова переменная на вновь создаваемый файл архива (чтобы потом скопировать его в другое место).</p>]]></content>
			<author>
				<name><![CDATA[DD]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=25263</uri>
			</author>
			<updated>2013-09-25T10:28:46Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=75552#p75552</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: CMD/BAT: Простая автоматизация резервного копирования под Windows]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=75546#p75546" />
			<content type="html"><![CDATA[<p>C:\&quot;Program Files&quot;\7-Zip\7z.exe a -t7z -mhe=on &quot;%$DST%\files%DATE:~-4%-%DATE:~3,2%-%DATE:~0,2%_%TIME:~0,2%-%TIME:~3,2%-%TIME:~6,2%.7z&quot; @%$SRC% -scsWIN -p%$PSW% -mx=%$COMPR% -ssw -xr@%$EXC% &gt;&gt; log_7z.log</p><p> я так полагаю вот что создает Ваш архив, у Вас должен быть установлен 7-Zip,о какой переменной идет речь.</p>]]></content>
			<author>
				<name><![CDATA[ozkr]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=30819</uri>
			</author>
			<updated>2013-09-25T07:18:23Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=75546#p75546</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[CMD/BAT: Простая автоматизация резервного копирования под Windows]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=75525#p75525" />
			<content type="html"><![CDATA[<p>Здесь полное описание <a href="http://habrahabr.ru/post/101390/">http://habrahabr.ru/post/101390/</a>.</p><div class="codebox"><pre><code>@Echo Off
echo %date% %time% ***Start***
SetLocal EnableDelayedExpansion
Set $SRC=list_add.txt
Set $EXC=list_excl.txt
Set $DST=D:\backups
Set $PSW=password
Set $COMPR=1
Set $COPIES=7
C:\&quot;Program Files&quot;\7-Zip\7z.exe a -t7z -mhe=on &quot;%$DST%\files%DATE:~-4%-%DATE:~3,2%-%DATE:~0,2%_%TIME:~0,2%-%TIME:~3,2%-%TIME:~6,2%.7z&quot; @%$SRC% -scsWIN -p%$PSW% -mx=%$COMPR% -ssw -xr@%$EXC% &gt;&gt; log_7z.log
For /F &quot;Delims=&quot; %%i In (&#039;DIR /B/O:-N %$DST%\files????-??-??_??-??-??.7z&#039;) Do (
Set /A $COPIES-=1
If !$COPIES! LSS 0 DEL &quot;%$DST%\%%i&quot;
)
echo %date% %time% ***End***</code></pre></div><p>Подскажите, где в коде переменная на свежесозданный архив?</p>]]></content>
			<author>
				<name><![CDATA[DD]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=25263</uri>
			</author>
			<updated>2013-09-24T10:56:11Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=75525#p75525</id>
		</entry>
</feed>
