<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; WSH: добавить дату к имени файла]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=6727&amp;type=atom" />
	<updated>2012-01-26T04:43:03Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=6727</id>
		<entry>
			<title type="html"><![CDATA[Re: WSH: добавить дату к имени файла]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=56002#p56002" />
			<content type="html"><![CDATA[<p>Или так даже<br /></p><div class="codebox"><pre><code>set x=new RegExp
x.Pattern=&quot;[^0-9]&quot;
x.Global=true
msgbox(x.replace(date,&quot;&quot;))</code></pre></div>]]></content>
			<author>
				<name><![CDATA[smaharbA]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=2911</uri>
			</author>
			<updated>2012-01-26T04:43:03Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=56002#p56002</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: WSH: добавить дату к имени файла]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=56000#p56000" />
			<content type="html"><![CDATA[<p>лучше будет так как то</p><p>set x=new RegExp<br />x.Pattern=&quot;[^0-9]&quot;<br />msgbox(replace(date,x.Execute(date)(0),&quot;&quot;))</p>]]></content>
			<author>
				<name><![CDATA[smaharbA]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=2911</uri>
			</author>
			<updated>2012-01-26T04:09:17Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=56000#p56000</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: WSH: добавить дату к имени файла]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=55997#p55997" />
			<content type="html"><![CDATA[<p>Ну, что окончательный вариант:<br /></p><div class="codebox"><pre><code>Dim strRun
strRun=&quot;&quot;&quot;C:\Program Files\1cv81\bin\1CV8.EXE&quot;&quot; CONFIG /S &quot;&quot;sql_hiper\dkp&quot;&quot;/N &quot;&quot;Администратор&quot;&quot;/P &quot;&quot;mikromax&quot;&quot;/DumpIB &quot;&quot;F:\bac\dkp\DKP_Backup&quot; &amp; replace(date,&quot;.&quot;,&quot;&quot;) &amp; &quot;.dt&quot;&quot;&quot;                

Set WshShell=CreateObject(&quot;WScript.Shell&quot;)

ReturnCode=WshShell.Run(strRun)</code></pre></div>]]></content>
			<author>
				<name><![CDATA[chichva]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26880</uri>
			</author>
			<updated>2012-01-25T14:58:31Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=55997#p55997</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: WSH: добавить дату к имени файла]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=55996#p55996" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>smaharbA пишет:</cite><blockquote><p>а чем к примеру replace(date,&quot;.&quot;,&quot;&quot;) не канает ?</p></blockquote></div><p>Так я, только недавно за VBScript взялся, так сказать - разведка-боем. <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /></p>]]></content>
			<author>
				<name><![CDATA[chichva]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26880</uri>
			</author>
			<updated>2012-01-25T12:37:22Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=55996#p55996</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: WSH: добавить дату к имени файла]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=55995#p55995" />
			<content type="html"><![CDATA[<p>а чем к примеру replace(date,&quot;.&quot;,&quot;&quot;) не канает ?</p>]]></content>
			<author>
				<name><![CDATA[smaharbA]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=2911</uri>
			</author>
			<updated>2012-01-25T12:23:11Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=55995#p55995</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: WSH: добавить дату к имени файла]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=55994#p55994" />
			<content type="html"><![CDATA[<p>Да,классный вариант, сработало! Спасибо огромное! Именно то что нужно и все грамотно работает.<br />Хотел chichva сказать спасибо не нашел где.<br />Надо бы форуму добавить систему спасибок пользователю.</p>]]></content>
			<author>
				<name><![CDATA[Даурен]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27528</uri>
			</author>
			<updated>2012-01-25T11:24:29Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=55994#p55994</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: WSH: добавить дату к имени файла]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=55993#p55993" />
			<content type="html"><![CDATA[<p>Может вот так:<br /></p><div class="codebox"><pre><code>Dim strRun

if  day(date) &lt; 10 then strRun=&quot;0&quot;
strF=strF &amp; day(date) 

if  month(date) &lt; 10 then strRun=strF &amp; &quot;0&quot;
strRun=strRun &amp; month(date) 

strRun=strRun &amp; Year(date)
strRun=&quot;&quot;&quot;C:\Program Files\1cv81\bin\1CV8.EXE&quot;&quot; CONFIG /S &quot;&quot;sql_hiper\dkp&quot;&quot;/N &quot;&quot;Администратор&quot;&quot;/P &quot;&quot;mikromax&quot;&quot;/DumpIB &quot;&quot;F:\bac\dkp\DKP_Backup&quot; &amp; strRun &amp; &quot;.dt&quot;&quot;&quot;                

Set WshShell=CreateObject(&quot;WScript.Shell&quot;)

ReturnCode=WshShell.Run(strRun)</code></pre></div>]]></content>
			<author>
				<name><![CDATA[chichva]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26880</uri>
			</author>
			<updated>2012-01-25T11:06:20Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=55993#p55993</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: WSH: добавить дату к имени файла]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=55976#p55976" />
			<content type="html"><![CDATA[<p><span style="color: Green"><strong>Даурен</strong>, я написал <em>правильный</em> заголовок темы, перенёс в <em>правильный</em> раздел форума, оформил текст согласно <a href="http://forum.script-coding.com/rules.html">Правилам форума</a>, исправил более-менее орфографию, грамматику и стилистику.</span></p><p><span style="color: Green">В дальнейшем жду этого от Вас.</span></p>]]></content>
			<author>
				<name><![CDATA[alexii]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=1844</uri>
			</author>
			<updated>2012-01-24T12:57:20Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=55976#p55976</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[WSH: добавить дату к имени файла]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=55973#p55973" />
			<content type="html"><![CDATA[<p>Всем привет! Есть скрипт, который выгружает базу 1с и кладет ее в каталог. Но каждый раз, когда он кладет ее в каталог предыдущая копия базы затирается. На ум пришло, к имени базы прикреплять дату, но как это сделать не сообразил. Вот скрипт:<br /></p><div class="codebox"><pre><code>Set WshShell=CreateObject(&quot;WScript.Shell&quot;)

ReturnCode=WshShell.Run(&quot;&quot;&quot;C:\Program Files\1cv81\bin\1CV8.EXE&quot;&quot; CONFIG /S &quot;&quot;sql_hiper\dkp&quot;&quot;/N &quot;&quot;Администратор&quot;&quot;/P &quot;&quot;mikromax&quot;&quot;/DumpIB &quot;&quot;F:\bac\dkp\DKP_Backup.dt&quot;&quot;&quot;)</code></pre></div><p>В конструкции RUN cmd инструкция запуска базы и ее выгрузка в каталог. Сейчас при выгрузке выгружается файл вида F:\bac\dkp\DKP_Backup.dt и каждый раз идет перезатирание (скрипт запускается через «Назначенные задания»), а нужно чтобы было так:<br /></p><div class="codebox"><pre><code>F:\bac\dkp\DKP_Backup24012012.dt 
F:\bac\dkp\DKP_Backup25012012.dt</code></pre></div><p>и т.д.</p><p>Спасибо!</p>]]></content>
			<author>
				<name><![CDATA[Даурен]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27528</uri>
			</author>
			<updated>2012-01-24T11:43:53Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=55973#p55973</id>
		</entry>
</feed>
