Here is the script I tried. Could someone help in fixing the bug in the script.?
FTPCommands.txt
open $hostname
user $username
$password
latest_file=$(ls File_Name* | tail -1)
binary
dir=F:/home/user/myFolder
cd $dir
put $latest_file
quit
Running the script as FTPTest.bat
ftp -i -s FTPCommands.txt > FTPLog.txt
While I'm calling directory in script , 550 error code is seen in the logs.