Topic "Sftp script error - "invalid session number""

Author Message
Miki

Guest


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
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
The close command accepts a sequence number of the session (would be "1" in your case), not a name of opened site.
See http://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.
_________________
Martin Prikryl
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License