I'm trying to automate file upload by creating .bat file which when run will upload files to SFTP server. I would like to automate this process, but sftp
command line asks for password. Is there a way to enter the password in .bat file to automate it?
This is the code I'm using. It works, but user needs to enter the password. Is there a way to create batch file where password will be entered automatically?
sftp user@ip
password
put C:\Users\user\Desktop\folder\* /public_html/upload