@echo off
set "FT=*.*"&@rem *.jpg特指全部jpg文件，*.*指所有类型的文件，*指所有文件和文件夹。
set TD=%cd%
set "LD=D:\MACRO\MACRO-EN\MACRO_MG82F5B32\code\include"
for /f "delims=" %%a in ('dir /a-d /b "%LD%\%FT%"') do (
REPLACE /R /S "%LD%\%%~a" "%TD%"
)
set "LD=D:\MACRO\MACRO-EN\MACRO_MG82F5B32\BAT"
for /f "delims=" %%a in ('dir /a-d /b "%LD%\%FT%"') do (
REPLACE /R /S "%LD%\%%~a" "%TD%"
)

set "LD=D:\MACRO\MACRO-EN\MACRO_MG82F5B32\KeilPrj"
for /f "delims=" %%a in ('dir /a-d /b "%LD%\%FT%"') do (
REPLACE /R /S "%LD%\%%~a" "%TD%"
)

set "LD=D:\MACRO\MACRO-EN\MACRO_MG82F5B32\Source.si4project"
for /f "delims=" %%a in ('dir /a-d /b "%LD%\%FT%"') do (
REPLACE /R /S "%LD%\%%~a" "%TD%"
)
pause
    