Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

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.
Miki

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