Script not executing/recognizing commands

Advertisement

rmcanally@abellgroup.com
Joined:
Posts:
2

Script not executing/recognizing commands

Greetings,

I've recently encountered a strange problem with WinSCP.com /script behavior. A simple script which has 3 commands: and open command, an put command and an exit, which was working for several years (and similar scripts being used with other partners continue to work fine) is ignoring/missing/not seeing the put command after the open. What is especially strange is running WinSCP.com and pasting the 3 commands contained in the script work fine. I'm attaching the credential blurred out snapshot of the script, the batch file and the log showing the "Ambiguous command" error. Your help will be greatly appreciated.

Abell SFTP Script.png

Reply with quote E-mail

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
42,591
Location:
Prague, Czechia

Re: Script not executing/recognizing commands

Seeing this truncated command in the log, I guess you have some special/strange character in your host key:
> 2025-12-15 12:18:44.821 Script: open sftp://.../ -hostkey="ssh-rsa 2048 JOWSZHHyqS8cJxh3IiJ/Z9ar9qEaY0pysvzGuZBXnow
Hard to be more specific without seeing your script file.

Reply with quote

rmcanally@abellgroup.com
Joined:
Posts:
2

Greetings,
There are 3 lines in the script an OPEN, PUT and EXIT. If I run WinSCP.com and copy and paste those 3 lines individually from the WinSCP command prompt, they all work, they just fail when executing WinSCP.com with the /script="SyscoSend.ftp" parameter (see the attached log file). If there was a "strange" character in the OPEN command, wouldn't it fail pasting into the WinSCP.com command prompt too?

However, it appears as though our customer has made some change(s) on their end (without telling us of course), because it is now working.

Thanks for responding...

Reply with quote E-mail

martin
Site Admin
martin avatar

Copy-pasting might alter the "strange" character.
Btw, I cannot imagine that a change on server-side could fix this problem.

Reply with quote

Advertisement

You can post new topics in this forum