including password in script - error 'host not found'
My ultimate goal is to use WinSCP to read usernames and passwords from a csv file and upload a test file to each account. I am trying to establish just connecting from the command line. This is my sanitized command. My password does not have any special characters in it.
"C:\Program Files\WinSCP\winscp.exe" /console /command /log "option batch on" "option confirm off" "open username:password@sftp.domain.com" "put c:\Scripts\sftptest\testfile.txt" "exit"
When I run this command I get "Searching for host. Host does not exist". How can I pass the username and password on one line? I was hoping to put this command in a script and replace the username and password with variables.
"C:\Program Files\WinSCP\winscp.exe" /console /command /log "option batch on" "option confirm off" "open username:password@sftp.domain.com" "put c:\Scripts\sftptest\testfile.txt" "exit"
When I run this command I get "Searching for host. Host does not exist". How can I pass the username and password on one line? I was hoping to put this command in a script and replace the username and password with variables.