Today I'm working on the FOR statement and don't know how to combine the for statement with findstr. The following are the separate programs. Please help. Thanks~
Requirement: Extract the content after the project field
2.ini
Hierarchy ID : Normal Board
Chip SKU : 250
Project : 1060-0011
CDP : N/A
1.bat
@echo off
DEL 1.txt
findstr "^Project" 2.ini>1.txt
2.bat
@echo off
setlocal
for /f "delims=: tokens=2" %%i in (1.txt) do (
set biosv=%%i
)
echo.%biosv% >bios.dat
endlocal
Above, I want to combine 1.bat and 2.bat. How should I add 1.bat into 2.bat?
Requirement: Extract the content after the project field
2.ini
Hierarchy ID : Normal Board
Chip SKU : 250
Project : 1060-0011
CDP : N/A
1.bat
@echo off
DEL 1.txt
findstr "^Project" 2.ini>1.txt
2.bat
@echo off
setlocal
for /f "delims=: tokens=2" %%i in (1.txt) do (
set biosv=%%i
)
echo.%biosv% >bios.dat
endlocal
Above, I want to combine 1.bat and 2.bat. How should I add 1.bat into 2.bat?


