How to include duplicate values when setting environmental variable SET in dos
- by Sachin
I am trying to get the values from a file which has duplilcates also. But while setting the values in environmental variable SET, it is not considering the duplicate values. I am using below code:
for /f "tokens=1,2 delims=@" %%a in (test.txt) do (
set size=............%%b
call set %%size:~-12%%=%%a
)
for /f %%a in ('set .') do >>outfile.txt echo %%a
Format of test.txt:
"C\ab"@12345678
"C\ab\we"@345678905
"C\ad\df"@345678905