Posted: 2016-04-05 11:31
Firstly forgive me for my ignorance. I am an amateur in WinSCP automation.
I am trying to upload a file which is in my local drive to Remote server. As suggested by someone, I am using the below code in VBScript (.VBS FIle). When I execute this, I am getting an error stating ' The system cannot find the file specified'
Set wshShell = WScript.CreateObject("WScript.Shell")
sftpcmd = "winscp /console /command ""open sftp://username:firstname.lastname@example.org.XX -hostkey=""""ssh-rsa 1024 b5:45:a1:fc:ea:33:61:1c:0a:5d:73:67:b9:XX:XX:XX"""""" ""put C:/Users/doddisri/ParentFolder/Dummy.txt /opt/jass/appresources/insr/tmp/folder/"" ""close"" ""exit"""
(NOTE: C:/Users/doddisri/ParentFolder/Dummy.txt is my file in local. I have to copy this file into /opt/jass/appresources/insr/tmp/folder/ which in Remote server. I have to upload this file on a daily basis)
I am not understanding why am getting the error. Is it probably because of the way am invoking winscp? I have been trying a lot, but in vain.
Any suggestions would be of great help.
Location: Prague, Czechia
There's nothing wrong with your command.
Enable logging and attach the log here:
You can post new topics in this forum
And it's free!