Scripting Help for Simple Upload

Advertisement

jmcknight00
Joined:
Posts:
3
Location:
Juneau, AK

Scripting Help for Simple Upload

Hi, I am new to Winscp and am trying to automate a very simple upload to a remote server. I have created a .bat file and a .txt file to execute the script. I'm having trouble with the script file. Currently I have this:

Open sftp://<username>:<password>@bloomberg.com/
Put "c:\home\bbdumps\f2226icsh.inc" /log=c:\home\bbdumps\sftplog.txt
exit

The Winscp window opens and says "searching for host" but nothing else happens. So obviously it is not recognizing the syntax I used to open the sftp site and verify user name and password. I am successfully uploading this file manually via drag and drop from Winscp.

Any help would be appreciated highly! James

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,392
Location:
Prague, Czechia

Re: Scripting Help for Simple Upload

The /log=c:\home\bbdumps\sftplog.txt parameter must be on WinSCP command-line (along with /script=....), not in put command.

Once you fix that, attach the log file here.

Reply with quote

jmcknight00
Joined:
Posts:
3
Location:
Juneau, AK

Re: Scripting Help for Simple Upload

martin wrote:

The /log=c:\home\bbdumps\sftplog.txt parameter must be on WinSCP command-line (along with /script=....), not in put command.

Once you fix that, attach the log file here.


I uploaded the log file. Thanks for looking!
Last edited by jmcknight00 on 2022-08-02 16:05; edited 1 time in total

Reply with quote

jmcknight00
Joined:
Posts:
3
Location:
Juneau, AK

Re: Scripting Help for Simple Upload

martin wrote:

Thanks. Show us a log file from GUI for a comparison.

Hi, I'm sorry, I don't know what GUI is. Do you mean a log file from the old ftp batch?
Thanks...

James

Reply with quote

Advertisement

martin
Site Admin
martin avatar

Re: Scripting Help for Simple Upload

No I mean a log file for "uploading this file manually via drag and drop from Winscp."

Reply with quote

Advertisement

You can post new topics in this forum