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: Sun Mar 25, 2012 19:16    Post subject: Reply with quote

Code:
@echo off &chcp 1251 >nul &setlocal enableextensions
:: http://forum.wincmd.ru/viewtopic.php?p=90822#90822
:: Пример параметров для TC: "%P" "%T"

set "T=%~2" ||(
   echo Use: %~nx0 "C:\src\" "D:\trgt\"
   pause >nul &goto :eof
)
if not "%T:~-1%"=="\" set "T=%T%\"
cd /d "%~1"
for /f "delims=" %%f in ('dir /b/a-d') do (
   for /f "delims=" %%t in ('dir /b/a-d/s "%T%%%f" 2^>nul') do (
      if not "%%~zf"=="%%~zt" copy /b /y "%%f" "%%t" >nul
   )
)

сохранить как .cmd
View user's profile Send private message


Powered by phpBB © 2001, 2005 phpBB Group