Hi all,

I am very much new to any forum or discussion.I am working on C++ on ubuntu.
My problem is I have to transfer a file from my domain to a remote server which maintains these files using sftp which is provided by my linuc machine.
I am not allowed to use -b option in my sftp command nor can i write shell script.
I just have to transfer a simple file and this can be done by using the put provided by the sftp in my linux machine.And this all should be done in My C++ application.
Can any1 help me out?
Thanks in advance for the help

With -b option you can include a batch of commands in non interactive mode of sftp transfer . So may be you can use a c++ program with system command or exec commands to execute the commands you wanted to feed into the batch file and just pass on the output of those commands to the sftp command through pipe.

Thanks csurfer for checking out my query.But I have used something like this
echo "command" | sftp user@IP:<pathForTranfer>

it worked,If you have any suggestions to make it better,please do reply.