mirror of
https://gitee.com/seekfree/TC264_Library.git
synced 2026-06-04 03:32:56 +00:00
V3.3.1
移除正交编码器的断言检测
新增重命名工程工具
This commit is contained in:
39
Example/E02_uart_demo/AURIX修改工程名称.bat
Normal file
39
Example/E02_uart_demo/AURIX修改工程名称.bat
Normal file
@@ -0,0 +1,39 @@
|
||||
@echo off
|
||||
setlocal enabledelayedexpansion
|
||||
cd /d "%~dp0"
|
||||
for %%i in ("%cd%") do set "folderName=%%~nxi"
|
||||
set /p "userInput=<3D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>µĹ<C2B5><C4B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: "
|
||||
set "sourceFile=.project"
|
||||
set "tempFile=temp.txt"
|
||||
set "oldString=%folderName%"
|
||||
set "newString=%userInput%"
|
||||
if exist "%tempFile%" del /Q "%tempFile%"
|
||||
for /f "delims=" %%i in ('type "%sourceFile%"') do (
|
||||
set "line=%%i"
|
||||
set "modified=!line!"
|
||||
if defined modified (
|
||||
set "modified=!modified:%oldString%=%newString%!"
|
||||
echo !modified!>>"%tempFile%"
|
||||
) else (
|
||||
echo %%i>>"%tempFile%"
|
||||
)
|
||||
)
|
||||
move /y "%tempFile%" "%sourceFile%" >nul 2>&1
|
||||
|
||||
set "sourceFile=.cproject"
|
||||
if exist "%tempFile%" del /Q "%tempFile%"
|
||||
for /f "delims=" %%i in ('type "%sourceFile%"') do (
|
||||
set "line=%%i"
|
||||
set "modified=!line!"
|
||||
if defined modified (
|
||||
set "modified=!modified:%oldString%=%newString%!"
|
||||
echo !modified!>>"%tempFile%"
|
||||
) else (
|
||||
echo %%i>>"%tempFile%"
|
||||
)
|
||||
)
|
||||
move /y "%tempFile%" "%sourceFile%" >nul 2>&1
|
||||
|
||||
|
||||
endlocal
|
||||
|
||||
Reference in New Issue
Block a user