<?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: по сети переименовать файлы]]></title>
		<link>https://forum.script-coding.com/viewtopic.php?id=7342</link>
		<atom:link href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=7342&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «CMD/BAT: по сети переименовать файлы».]]></description>
		<lastBuildDate>Tue, 17 Jul 2012 05:11:07 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: CMD/BAT: по сети переименовать файлы]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=61654#p61654</link>
			<description><![CDATA[<p>спасибо всем за помощь.<br />дальше сам.<br />а может и нет.-)</p><p>всё ж таки нет. не сам.<br />почему так не работает ?<br /> </p><div class="codebox"><pre><code> set sFile=&quot;*.job&quot;</code></pre></div><p>хотя </p><div class="quotebox"><blockquote><p>Значением переменной команды set определяет все, что следует за знаком равенства (=). При вводе:</p><p>set testVar=&quot;test^1&quot;</p></blockquote></div>]]></description>
			<author><![CDATA[null@example.com (bugagashi)]]></author>
			<pubDate>Tue, 17 Jul 2012 05:11:07 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=61654#p61654</guid>
		</item>
		<item>
			<title><![CDATA[Re: CMD/BAT: по сети переименовать файлы]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=61610#p61610</link>
			<description><![CDATA[<p><strong>bugagashi</strong>, вот Вам примерная болванка для одного файла:<br /></p><div class="codebox"><pre><code>@echo off
setlocal enableextensions enabledelayedexpansion

set sFile=ала.9989ю lit.7.job

call :Replace &quot;%sFile%&quot;
call :Translite &quot;%Replace%&quot;

echo %Translite%

endlocal
exit /b 0

:Replace
    setlocal enableextensions enabledelayedexpansion
    set sFuncName=%~0
    
    set sName=%~n1
    set sValue=%sName:.=_%
    set sValue=%sValue: =_%
    
    endlocal &amp; set %sFuncName:~1%=%sValue%%~x1
    exit /b 0

:Translite
    setlocal enableextensions enabledelayedexpansion
    set sFuncName=%~0
    
    set &quot;sValue=%~1&quot;
    set &quot;sValue=%sValue:а=a%&quot;
    set &quot;sValue=%sValue:б=b%&quot;
    set &quot;sValue=%sValue:в=v%&quot;
    set &quot;sValue=%sValue:г=g%&quot;
    set &quot;sValue=%sValue:д=d%&quot;
    set &quot;sValue=%sValue:е=e%&quot;
    set &quot;sValue=%sValue:ё=jo%&quot;
    set &quot;sValue=%sValue:ж=zh%&quot;
    set &quot;sValue=%sValue:з=z%&quot;
    set &quot;sValue=%sValue:и=i%&quot;
    set &quot;sValue=%sValue:й=j%&quot;
    set &quot;sValue=%sValue:к=k%&quot;
    set &quot;sValue=%sValue:л=l%&quot;
    set &quot;sValue=%sValue:м=m%&quot;
    set &quot;sValue=%sValue:н=n%&quot;
    set &quot;sValue=%sValue:о=o%&quot;
    set &quot;sValue=%sValue:п=p%&quot;
    set &quot;sValue=%sValue:р=r%&quot;
    set &quot;sValue=%sValue:с=s%&quot;
    set &quot;sValue=%sValue:т=t%&quot;
    set &quot;sValue=%sValue:у=u%&quot;
    set &quot;sValue=%sValue:ф=f%&quot;
    set &quot;sValue=%sValue:х=h%&quot;
    set &quot;sValue=%sValue:ц=ts%&quot;
    set &quot;sValue=%sValue:ч=ch%&quot;
    set &quot;sValue=%sValue:ш=sh%&quot;
    set &quot;sValue=%sValue:щ=sch%&quot;
    set &quot;sValue=%sValue:ъ=&quot;%&quot;
    set &quot;sValue=%sValue:ы=y%&quot;
    set &quot;sValue=%sValue:ь=`%&quot;
    set &quot;sValue=%sValue:э=e%&quot;
    set &quot;sValue=%sValue:ю=ju%&quot;
    set &quot;sValue=%sValue:я=ja%&quot;
    
    endlocal &amp; set %sFuncName:~1%=%sValue%
    exit /b 0</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (alexii)]]></author>
			<pubDate>Mon, 16 Jul 2012 12:46:12 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=61610#p61610</guid>
		</item>
		<item>
			<title><![CDATA[Re: CMD/BAT: по сети переименовать файлы]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=61604#p61604</link>
			<description><![CDATA[<p>Можно, разложив на подстроки (см. FOR /?) с использованием разграничителя подстрок пробел и точка, в новую строку объединить подстроки уже без разграничителей. <br />С последней &quot;точкой&quot; надо подумать. Например, можно проверить, что подстрока за ней - последняя, если это так, то добавляем сами перед этой подстрокой свою &quot;точку&quot;.</p>]]></description>
			<author><![CDATA[null@example.com (Rom5)]]></author>
			<pubDate>Mon, 16 Jul 2012 09:39:31 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=61604#p61604</guid>
		</item>
		<item>
			<title><![CDATA[Re: CMD/BAT: по сети переименовать файлы]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=61543#p61543</link>
			<description><![CDATA[<p>спасибо.<br /></p><div class="quotebox"><cite>bugagashi пишет:</cite><blockquote><p>И дополнение к вопросу: Заменить пробелы и точки на &quot;_&quot;<br />Без последней точки.<br />&quot;ала.9989ю lit.7.job&quot; -&gt; &quot;ala_9989u_lit_7.job&quot;</p></blockquote></div><p>а тут ?</p>]]></description>
			<author><![CDATA[null@example.com (bugagashi)]]></author>
			<pubDate>Fri, 13 Jul 2012 12:01:25 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=61543#p61543</guid>
		</item>
		<item>
			<title><![CDATA[Re: CMD/BAT: по сети переименовать файлы]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=61542#p61542</link>
			<description><![CDATA[<p>Угу.</p>]]></description>
			<author><![CDATA[null@example.com (alexii)]]></author>
			<pubDate>Fri, 13 Jul 2012 11:53:01 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=61542#p61542</guid>
		</item>
		<item>
			<title><![CDATA[Re: CMD/BAT: по сети переименовать файлы]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=61541#p61541</link>
			<description><![CDATA[<div class="quotebox"><cite>alexii пишет:</cite><blockquote><div class="quotebox"><cite>bugagashi пишет:</cite><blockquote><p>Это хорошо. Теперь по сети. Как организовать?</p></blockquote></div><p>Ровно так же, как и для локальных папок.</p></blockquote></div><p>просто прописать полный путь ?</p>]]></description>
			<author><![CDATA[null@example.com (bugagashi)]]></author>
			<pubDate>Fri, 13 Jul 2012 11:47:29 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=61541#p61541</guid>
		</item>
		<item>
			<title><![CDATA[Re: CMD/BAT: по сети переименовать файлы]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=61539#p61539</link>
			<description><![CDATA[<div class="quotebox"><cite>bugagashi пишет:</cite><blockquote><p>Это хорошо. Теперь по сети. Как организовать?</p></blockquote></div><p>Ровно так же, как и для локальных папок.</p>]]></description>
			<author><![CDATA[null@example.com (alexii)]]></author>
			<pubDate>Fri, 13 Jul 2012 11:19:27 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=61539#p61539</guid>
		</item>
		<item>
			<title><![CDATA[Re: CMD/BAT: по сети переименовать файлы]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=61538#p61538</link>
			<description><![CDATA[<div class="quotebox"><cite>alexii пишет:</cite><blockquote><div class="quotebox"><cite>bugagashi пишет:</cite><blockquote><p>Как заменить на транслит рус. буквы?</p></blockquote></div><p><a href="http://forum.script-coding.com/viewtopic.php?id=2390">CMD/BAT: транслитерация текста</a></p></blockquote></div><p>Это хорошо.<br />Теперь по сети.<br />Как организовать?<br />Папок куча. <br />И все надо переименовать.</p><p>И дополнение к вопросу: Заменить пробелы и точки на &quot;_&quot;<br />Без последней точки.<br />&quot;ала.9989ю lit.7.job&quot; -&gt; &quot;ala_9989u_lit_7.job&quot;<br />как-то так.<br /></p><div class="codebox"><pre><code>for %%g in (*.job) do call :s_subroutine &quot;%%~nxg&quot; &quot;%%g&quot;
:s_subroutine
set _sss=%1
set _ddd=%_sss:.=_%
ren %2 %_ddd%
goto :eof</code></pre></div><p>но он и последнюю точку в поджопник превращает.<br />меня это расстраивает.</p>]]></description>
			<author><![CDATA[null@example.com (bugagashi)]]></author>
			<pubDate>Fri, 13 Jul 2012 11:12:33 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=61538#p61538</guid>
		</item>
		<item>
			<title><![CDATA[Re: CMD/BAT: по сети переименовать файлы]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=61536#p61536</link>
			<description><![CDATA[<div class="quotebox"><cite>bugagashi пишет:</cite><blockquote><p>Как заменить на транслит рус. буквы?</p></blockquote></div><p><a href="http://forum.script-coding.com/viewtopic.php?id=2390">CMD/BAT: транслитерация текста</a></p>]]></description>
			<author><![CDATA[null@example.com (alexii)]]></author>
			<pubDate>Fri, 13 Jul 2012 10:36:06 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=61536#p61536</guid>
		</item>
		<item>
			<title><![CDATA[Re: CMD/BAT: по сети переименовать файлы]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=61530#p61530</link>
			<description><![CDATA[<p>Сделать это возможно.<br />Нужно без vbs.<br />Как заменить на транслит рус. буквы? Нужно обязательно в локалке.<br /></p><div class="codebox"><pre><code>Menu, Tray, Icon, %SystemRoot%\system32\fontext.dll
#NoTrayIcon
foldersel=%A_ScriptDir%
Gui, Add, Edit, r1 w300  yp+15          vfoldersel, %foldersel%
Gui, Add, Button,  xp+300 default w80 , Обзор... ;
Gui, Add, Checkbox, Checked1  xp-300 yp+40 valertfaili, переименовывать файлы
Gui, Add, Checkbox, Checked1  valertpapki, переименовывать папки
Gui, Add, Checkbox, Checked1  vrec, смотреть в подпапках
Gui, Add, Checkbox, Checked1  vprobel, заменять [пробел] на [ _ ]
Gui, Add, Button, xp+20 yp+40 default w100 ,Переименовать
Gui, Add, GroupBox, xp+160 yp-95 Center R5.5 w200, Типы объектов
Gui, Add, Radio, gextent  Checked1  xp+15 yp+15 vext, ВСЕ
Gui, Add, Radio, gextent , с расширением
Gui, Add, ComboBox , disabled Uppercase xp+125 w50 vextchoice, TXT|JPG|ZIP|MP3|EXE|LNK|URL
Gui, Add, Checkbox, Checked1  xp-125 yp+30 vreadonly, только для чтения
Gui, Add, Checkbox, Checked1  vhide, скрытые
Gui, Add, Checkbox, Checked1  vsystem, системные
extent:
ControlGet, variab, Checked,, Button8, 
If variab = 1
Control, Disable,, ComboBox1,
else
Control, Enable,, ComboBox1,
Gui, Show, w400 h200, Транслитерация имён файлов и папок
return
ButtonОбзор...:
FileSelectFolder, obzor, ,
IF (obzor&lt;&gt;&quot;&quot;)
GuiControl,, foldersel, %obzor%
return
ButtonПереименовать:
Gui, Submit, nohide
SetWorkingDir %foldersel%
IF hide=0 
attr1=H,
else attr1=&quot;&quot;
IF readonly=0
attr2=R,
else attr2=&quot;&quot;
IF system=0 
attr3=S,
else attr3=&quot;&quot;
IF ext=1
extention=*
ELSE
extention = %extchoice%
IF alertfaili=1
incl=0
IF alertpapki=1
incl=2
IF (alertpapki=1 and alertfaili=1)
incl=1
IF (alertpapki=0 and alertfaili=0)
return
var := 0
loop *.%extention%, %incl%, %rec%
{
IF A_LoopFileAttrib contains %attr1%%attr2%%attr3%
continue
var := var + 1
f%var% = %A_LoopFilename%
d%var% = %A_LoopFileDir%
}
LOOP, %var%
{
file    := f%var%
fvarbu  := f%var%
dvarbu  := d%var%
StringReplace, file, file, а , a , All
StringReplace, file, file, б , b , All
StringReplace, file, file, в , v , All
StringReplace, file, file, г , g , All
StringReplace, file, file, д , d , All
StringReplace, file, file, е , e , All
StringReplace, file, file, ё , jo , All
StringReplace, file, file, ж , zh , All
StringReplace, file, file, з , z , All
StringReplace, file, file, и , i , All
StringReplace, file, file, й , jj , All
StringReplace, file, file, к , k , All
StringReplace, file, file, л , l , All
StringReplace, file, file, м , m , All
StringReplace, file, file, н , n , All
StringReplace, file, file, о , o , All
StringReplace, file, file, п , p , All
StringReplace, file, file, р , r , All
StringReplace, file, file, с , s , All
StringReplace, file, file, т , t , All
StringReplace, file, file, у , u , All
StringReplace, file, file, ф , f , All
StringReplace, file, file, х , kh , All
StringReplace, file, file, ц , c , All
StringReplace, file, file, ч , ch , All
StringReplace, file, file, ш , sh , All
StringReplace, file, file, щ , shh , All
StringReplace, file, file, ъ , &quot; , All
StringReplace, file, file, ы , y , All
StringReplace, file, file, ь , &#039; , All
StringReplace, file, file, э , eh , All
StringReplace, file, file, ю , ju , All
StringReplace, file, file, я , ja , All
StringReplace, file, file, А , A , All
StringReplace, file, file, Б , B , All
StringReplace, file, file, В , V , All
StringReplace, file, file, Г , G , All
StringReplace, file, file, Д , D , All
StringReplace, file, file, Е , E , All
StringReplace, file, file, Ё , Jo , All
StringReplace, file, file, Ж , Zh , All
StringReplace, file, file, З , Z , All
StringReplace, file, file, И , I , All
StringReplace, file, file, Й , Jj , All
StringReplace, file, file, К , K , All
StringReplace, file, file, Л , L , All
StringReplace, file, file, М , M , All
StringReplace, file, file, Н , N , All
StringReplace, file, file, О , O , All
StringReplace, file, file, П , P , All
StringReplace, file, file, Р , R , All
StringReplace, file, file, С , S , All
StringReplace, file, file, Т , T , All
StringReplace, file, file, У , U , All
StringReplace, file, file, Ф , F , All
StringReplace, file, file, Х , Kh , All
StringReplace, file, file, Ц , C , All
StringReplace, file, file, Ч , Ch , All
StringReplace, file, file, Ш , Sh , All
StringReplace, file, file, Щ , Shh , All
StringReplace, file, file, Ъ , &quot; , All
StringReplace, file, file, Ы , Y , All
StringReplace, file, file, Ь , &#039; , All
StringReplace, file, file, Э , Eh , All
StringReplace, file, file, Ю , Ju , All
StringReplace, file, file, Я , ja , All
IF probel=1
StringReplace, file, file, %A_SPACE%, _, All
IF alertpapki=1
{
    if (dvarbu&lt;&gt;&quot;&quot;)
    FileMoveDir, %dvarbu%\%fvarbu%, %dvarbu%\%file%
    else
FileMoveDir, %fvarbu%, %file%
}
IF alertfaili=1
{
    if (dvarbu&lt;&gt;&quot;&quot;)
    filemove, %dvarbu%\%fvarbu%, %dvarbu%\%file%
    else
filemove, %fvarbu%, %file%
}
var := var - 1    
}
return
GuiClose:
ExitApp</code></pre></div><p>У меня в win7 не работает.<br />Почему?<br />спасибо.</p>]]></description>
			<author><![CDATA[null@example.com (bugagashi)]]></author>
			<pubDate>Fri, 13 Jul 2012 09:24:06 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=61530#p61530</guid>
		</item>
		<item>
			<title><![CDATA[Re: CMD/BAT: по сети переименовать файлы]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=61514#p61514</link>
			<description><![CDATA[<p>Ориентировочно в ноябре 2008 г. я создал в разделе &quot;AutoHotkey - разработка&quot; похожую тему. Кто-то предложил аналог то ли на CMD/BAT, то ли на VBS. Если есть желание, поднимите архив, покопайтесь.</p>]]></description>
			<author><![CDATA[null@example.com (ypppu)]]></author>
			<pubDate>Thu, 12 Jul 2012 14:56:46 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=61514#p61514</guid>
		</item>
		<item>
			<title><![CDATA[Re: CMD/BAT: по сети переименовать файлы]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=61513#p61513</link>
			<description><![CDATA[<p>Имя подкаталога из переданного пути можно будет выделить разложением строки на составляющие командой &quot;FOR&quot;.<br />В папке может быть только один файл, что Вы по нему имя файла задаете?</p><p>ps. считаю, что транслит, да и весь остальной сценарий, легче организовать на vbscript.</p>]]></description>
			<author><![CDATA[null@example.com (Rom5)]]></author>
			<pubDate>Thu, 12 Jul 2012 14:37:42 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=61513#p61513</guid>
		</item>
		<item>
			<title><![CDATA[CMD/BAT: по сети переименовать файлы]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=61509#p61509</link>
			<description><![CDATA[<p><span style="color: Green"><strong>Д</strong></span>оброе утро.</p><p><span style="color: Green"><strong>Н</strong></span>еобходимо переименовать файлы в сетевой папке. </p><p>1. <span style="color: Green"><strong>В</strong></span>зять название папки. <span style="color: Green"><strong>Э</strong></span>то будет будущее название файла<span style="color: Green"><strong>.</strong></span><br />2. <span style="color: Green"><strong>И</strong></span>зменить кириллицу на транслит.<br />3. <span style="color: Green"><strong>С</strong></span>тарый файл оставить как есть.</p><p><span style="color: Green"><strong>В</strong></span>озможно ли это сделать?<br /><span style="color: Green"><strong>И,</strong></span> если было<span style="color: Green"><strong>,</strong></span> подскажите ссылку.</p><p><span style="color: Green"><strong>З</strong></span>аранее благодарен<span style="color: Green"><strong>.</strong></span></p>]]></description>
			<author><![CDATA[null@example.com (bugagashi)]]></author>
			<pubDate>Thu, 12 Jul 2012 06:01:04 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=61509#p61509</guid>
		</item>
	</channel>
</rss>
