Question

How to automate file transfer

Posted December 14, 2021 131 views

I wanted to automate sftp and I did it through a C program using sshpass which calls sftp and pass to it the password together with a pointer from sftp to a text archive containing the rest of commands I should pass to sftp. This text archive I can edit as many times I want to fill with the name of the files which will be “puted” or “geted” so, basically what my C program does is to call sftp via sshpass but now I have an automated program to download or upload files to the server. And the files have the same name and nothing but to run the C program.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
Submit an Answer
1 answer

Hi @tarcisioWalrus,

This sounds like a pretty useful script/program. Having said that, I’m not sure what exactly is your question or are you just sharing knowledge and experience which is great?

Looking forward to your reply.