Shell Script to transfer files from unix to windows

I have to transfer a file from unix to windows through Shell Script. I am using the below script, but it is not working. Please help. Please note --- I have to transfer the file from unix to windows. Not from windows to unix. I mean I don't have to use batch script.Only through unix shell script.

filenames= $(
find . -name "testfile*" -print |\
while read $file
do
   echo "put $file"
done )
 
ftp -nv<<EOF
open <<IP address of the windows system>> <<EOF
user username Password
ASC
$files
bye
EOF

Do I need to open any firewall or to install a third party software.

You can test the ftp port is opened or not on the windows server. With this, you can make sure, if the firewall is opened and if the ftp service is started

login your unix box
telnet WINDOWS_HOSTNAME 21