What is in your "setenv.cmd" ? What you need to it basically like has been said above. I imagine you need:
@Echo off
setlocal
REM Save this as ftpscript.cmd or something
call setenv.cmd
rem Assuming now you have done in there set username= set password= etc.
echo %date% %time% Creating a script file in the temp dir
(echo open %server%
echo %username%
echo %password%
echo lcd %downloadpath%
echo cd ..
echo cd ..
echo cd essbase111
echo ls -al
echo asc
echo get cfm_extract.txt
echo bye ) > "%temp%\ftpscript.txt"
echo %date% %time% Now executing FTP
ftp -i -s: "%temp%\ftpscript.txt"
echo %date% %time% Completed