Strange issue with WinSCP

Advertisement

puritan
Joined:
Posts:
1

Strange issue with WinSCP

OK so this post is gonna be a little bit longer but hang in there.
First of all I am fully aware of WinSCP and most of its features, been using WinSCP for many many years.

So I have a script getting files from an SFTP that has been running for 2-3 years, one time each week and it has been running smoothly without issues. The address for the SFTP changed and I updated the script and key but now a lot of strange things is happening.

So this is the command that is running WinSCP with the script file.
"C:\Program Files (x86)\WinSCP\WinSCP.exe" /log="I:\Logs\WinSCP\WinSCP.log" /ini=nul /script="I:\Import\Get_Import_Files.txt"
The script file looks like this.
option batch on
option confirm off
open sftp://Username:Password@ADDRESS -hostkey="ssh-rsa 1024 Long key"
 
lcd "I:\Import\"
cd outbox
option transfer binary
get -delete *.csv 
 
close
exit
 
# Execute the script using a command like:
# "C:\Program Files (x86)\WinSCP\WinSCP.exe" /log="I:\Logs\WinSCP\WinSCP.log" /ini=nul /script="I:\Import\Get_Import_Files.txt"
So normally when things don't work I run this with logs and go through the logs to figure out what's wrong but
"C:\Program Files (x86)\WinSCP\WinSCP.exe" /log="I:\Logs\WinSCP\WinSCP.log" /ini=nul /script="I:\Import\Get_Import_Files.txt"
don't give me any logs, it looks like it's doing nothing at all.
Removing the last part and running it like this:
C:\Program Files (x86)\WinSCP\WinSCP.exe /log="I:\Logs\WinSCP\WinSCP.log" /ini=nul
Starts WinSCP with blank connection information.

I can't remember there being any updates installed lately and I am currently running
Version 5.9.5 (Build 7441)

And I can access the SFTP using winSCP GUI with no trouble. I have tried using the self creating script from the GUI, I have rechecked the key and tried everything but it seems running it with the script file nothing happens.

I tried switching to winscp.com and use the batch file way but then I get the error
Incompatible external console protocol version 9.
And yeah I have multiple scripts running almost the same solution against different sites and its working without any issues, these are automated, when trying to run one of the files, that is working automatized, manually it also behaves in the same way as the example above.

So I am not sure what to do next since I cannot give you a log of what's happening, any ideas?

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
36,052
Location:
Prague, Czechia

Re: Strange issue with WinSCP

Use winscp.com to debug the problem. Make sure you have the same version of winscp.com and winscp.exe.

Reply with quote

Advertisement

You can post new topics in this forum