Sftp script error - "invalid session number"

Advertisement

Miki
Guest

Sftp script error - "invalid session number"

I have saved sessions in Winscp (sftp port 22 with user name and password (no private key) )
and I can connect them via winscp gui with no problam.
When I call them using this following script

open AAA
option confirm off

get / *. csv C: \ WinscpFiles \ Accounts \ AAA \

Close AAA

I get
authenticated
starting the session...
reading remote directory...
session started.
Active session: [1] AAA
confirm off
invalid session number 'AAA'


please advice
Thanks
Miki

Reply with quote

Advertisement

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

Re: Sftp script error - "invalid session number"

The close command accepts a sequence number of the session (would be "1" in your case), not a name of opened site.
See https://winscp.net/eng/docs/scriptcommand_close

But I rather see a problem with your put command, as it seems no files are uploaded. Do you indeed have all the spaces in the paths there in your script? As it does not look plausible this can work.

Reply with quote

Advertisement

You can post new topics in this forum