This is asked quite often in the forum - sftp is used either with entering password etc. manually or passwordless via key exchange.
The -b is to specify a batchfile that contains commands, not passwords.
Set up public keys which have been generated without entering a passphrase using ssh-keygen and try again.
Also scp might be more comfortable than sftp, if you have a choice.
I dont want to use keys..
Could you please help me If I can use password with the command itself..
Because I dont want interactive mode for connecting to other server.
Keys are much more secure than clear passwords stored in some file. It supports, as said already, usage of keys or interactive passwords. It does not support password supply from files!
Keys are easy, keys are secure, so why don't use keys...
If you still don't want to use keys, I can't help you
If you don't want an interactive login, why are you trying to use interactive password authentication? Use pre-shared keys. That's what they're there for.
ssh is designed to stop you from shoehorning in stored plaintext passwords; you really have to go out of your way to fake it well enough to fool it. This is a subtle hint written in mile-high flashing neon letters. You're not supposed to do this. Stored passwords are obsolete. There's better ways to do what you want, ways that do exactly what you want without the fundamental security flaws of storing passwords.