There are some problems in the code.
cd d:\My_testwill only work if you are on D:, you can use cd /deither pushdhere.
echo ...%size% does not work, because it expands when the for block is parsed not when it is executed.
if existseems redundant as it for %%i in ( united_ops*.csv)only expands if any file exists.
ECHO ON
setlocal EnableDelayedExpansion
del activity_ftp.log
pushd D:\My_Test
for %%i in (united_ops*.csv) do (
set size=0
set /A size=%%~zi
echo %%i,!size!,397312,624640 > D:\My_Test\activity_ftp.log
)