Articles

do the same process for several files

January 8, 2013 at 06:31:47
Specs: Windows XP

hey all
i have a batch file that copy a certain value from specific ini file
set filename=filename
it goes like this:
for /f "tokens=1,2 delims==" %%a in (%filename%) do (
if %%a=value set value=%%b
)
echo %filename% %value%


i have a dir full with ini files, and i want the batch will copy the same value from all of those file, and copy the the file name and the value into a one text file

thanks a lot!!


See More: do the same process for several files

Report •


#1
January 8, 2013 at 07:46:04

for %%j in (*.ini) do (
  for /F "tokens=1,2 delims==" %%a in (%%j) do (
    if "%%a"=="value" echo.%%j %%b >> "result.txt"
  )
)


Report •

#2
January 8, 2013 at 09:40:22

you might want: if /i

Report •

Related Solutions


Ask Question