I havent find anything on internet so i need your help.
I have 2 CSV Files that i would like to compare:
the first one is like :
"Name","PrimarySmtpAddress","EmailAddresses"
the second one is like :
"Name","$_.TotalItemSize.Value.ToMB()"
the output file must show which name is both in first and second files
And i want to have, as output, a file with all the data in the first files but with the "$_.TotalItemSize.Value.ToMB()" added a the end of each lines.
for exemple it would do something like :
"Name","PrimarySmtpAddress","EmailAddresses","$_.TotalItemSize.Value.ToMB()",
I must be not very clear because me english is not perfect. Can you guys please help me ? im not very good at scripting. thank you very much.
edit :
REM @echo off
setlocal enabledelayedexpansion
set var1
set var2
for /f "tokens=1 delims=," %%A in (file2.txt) do (
set var1=%%A
echo %var1%
for /f "tokens=1 delims=," %%B in (file1.txt) do (
set var2=%%B
echo %var2%
if ("%var1%"=="%var2%")
(
echo equal var
)
else
(
echo not equal var
)
pause
)
)
pause
It looks like the IF is not working