Script: Exit code: 1

Advertisement

Joe S.
Guest

Script: Exit code: 1

I'm having problems testing the simplest code. Just trying to SFTP a file from my pc to a Windows 2022 standard server. Also trying on the same server to use WinSCP to test SFTP to get the file from one folder to another. Both results yield 'Exit code: 1'
Attached is the command that I'm using and the log.
  • WinSCP command.txt (261 Bytes, Private file)
  • winscp.log (11.76 KB, Private file)

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
40,291
Location:
Prague, Czechia

Re: Script: Exit code: 1

The command-line should be:
C:\Program Files (x86)\WinSCP>WinSCP.exe /log=c:\temp\winscp.log /command "open sftp://testuser:Pa%24%24word@PRD-DiscrptsOTS/ -hostkey=""ssh-ed25519 255 G1cKyAeALo4n+XxbA82L8Q+tMVNZXVentxavvnVqoho""" "put ""c:\Temp\test SFTP file.txt"" /C:/Users/testuser/Documents/*.*"
See https://winscp.net/eng/docs/commandline#syntax

WinSCP GUI can also generate a working command-line for you:
https://winscp.net/eng/docs/guide_automation#generating

Reply with quote

Advertisement

You can post new topics in this forum