Hello friends,
i need to copy some folders one location to other by using robo copy.
conditions are;
1. copy the folder names which are start with alphabet "T" with extension of two letters.
2. do not copy the folder names which are start with alphabet "T" with more the two extension.
I have created one batch for this process but that program copies all folders which are start with "T"
echo off
set TOOLHOME=%~dp0
set TOOLNAME=%~n0
:=== for Backup =======================
set SOURCE=D:\LocalData
set TARGET=D:\test3
:======================================
:-------------------------
echo I will copy from "%SOURCE%" to "%TARGET%".
set /p yesno=Can I start? [Y/N]
if "%yesno%" == "y" goto :START
if "%yesno%" == "Y" goto :START
echo Canceled.
START
FOR /D /R %SOURCE% IN (T*) DO ROBOCOPY "%SOURCE%" "%TARGET%\DTS%~pG%~nxG" /E /S /NP
echo Done.
pause>nul
Please provide solution for this ....
thanks in advance
regards
krishnamoorthy