Total Commander Forum Index Total Commander
Форум поддержки пользователей Total Commander
Сайты: Все о Total Commander | Totalcmd.net | Ghisler.com | RU.TCKB
 
 RulesRules   SearchSearch   FAQFAQ   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Single Post  Topic: Синхронизация каталогов с учетом регистра 
Author Message
Tol!k



PostPosted: Sat Apr 21, 2012 20:43    Post subject: Reply with quote

Code:
@echo off &setlocal enableextensions &chcp 1251 >nul

if "%~2"=="" (echo Use: "C:\name\" "D:\sake\" &pause >nul &goto :eof)
call :ren "%~1" "%~2"

for /f "delims=" %%d in ('dir /b/ad/s "%~1"') do (
   set "name=%%d"
   call :ren "%%d" "%~2\%%name:%~1=%%"
)
goto :eof

:ren
set "T=%~2"
for /f "delims=" %%n in ('dir /b/a-d "%~1"') do (
   for /f "delims=" %%t in ('dir /b/a-d "%T%\%%n" 2^>nul') do (
      if not "%%n"=="%%t" ren "%T%\%%n" "%%n"
   )
)
goto :eof

только переименовывает, и только файлы
View user's profile Send private message


Powered by phpBB © 2001, 2005 phpBB Group