But SFTP was built to overcome this limitation and doesn’t allow password to supplied as an argument due to security reasons (S stands for Secure). So, you have following option to make SFTP work.

SSH Keys:The most common method (which we also used) is to use ssh keys. The system that wants to connect (in this case it was Siebel) will generate a Public key and a Private Key. Public Key resides on the target server and Private Key resides on the server where the session is initiated (Siebel). This approach allows you to connect to target server without actually using the password.

Expect Library:
The Second approach is to use Expect Library. It allows you to automate certain tasks but script is tedious to write and often error prone.

PSFTP tool:
You can also use PSFTP tool which allows you supply password as an argument and takes care of rest of things.

The Second and third approach are plagued with same problem as FTP, your password is exposed to everybody who has access to shell script. This is not desirable in secure environments.

Thanks Neel,
One another query, I have written code for simple FTP using windows(or DOS) OS commands ecexuted from clib.system from escipt. Have you used Shell Script because this script will execute on Server machine where the OS is UNIX? is there a specific reason why you went for Shell script to SFTP?
Yeah also pls put more details and setting up SSH keys.