Topic "need help with scripts"

Author Message
sulasno
[View user's profile]

Joined: 2010-08-21
Posts: 11
I have a batch file;

X:\Path\WinSCP.exe /console /command "option echo on" "option batch abort" "option confirm off" "open sftp://username:password@tdomain.com:22 -hostkey=""rsa2@22:domain.com=0x23,bunchofnumbers""" "ls " "cd /var/www/domain/path/" "put X:\Domain\path\file.xml" "exit"

(I noticed that there is an extra " or am I missing one)

I create another batch file with the following;

@echo off
X:\path\WinSCP.com /console /script="upload.txt"

What is missing in my upload.txt?

cd X:\path\WinSCP
option echo on
option batch on
option confirm off
open sftp://username:password@domain.com:22
cd /var/www/domain/path
option transfer binary
put X:\path\chrome.exe
put X:\path\sign.exe
close
exit

where do I insert the hostkey ?
Advertisements
venkatt
[View user's profile]

Joined: 2010-08-19
Posts: 5
Try this

open sftp://username:password@domain.com:22 -privatekey=\"C:\\Documents and Settings\\Administrator\\Desktop\\key.ppk\

open sftp://username:password@domain.com:22 -hostkey="ssh-rsa 1024 xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx"
sulasno
[View user's profile]

Joined: 2010-08-21
Posts: 11
thanks for the quick response

edit

I tried and got the following at the end;

close
No session
Invalid access to memory
exit
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24553
Location: Prague, Czechia
This is known problem of 4.2.8. Try downgrading to 4.2.7.
_________________
Martin Prikryl
sulasno
[View user's profile]

Joined: 2010-08-21
Posts: 11
if 4.2.8 is working, I can live with the bug
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