Want to run SFTP command in a bash script without being prompted? Here are quick examples of 2 approaches; one with password based authentication and one with private key authentication.
Password Authentication
cd /source_directory_on_local
echo "cd /target_directory_on_remote" > /tmp/commands.txt
echo