Re: I can't assign files with batch file, it stays in the folder.
Thank you for your support, the transaction was successful.
"C:\Program Files (x86)\WinSCP\winscp.com" /command ^
"open [rest of your open command]" ^
"cd /simple/millnet/xxx" ^
"put ""C:\app\deneme.txt""" ^
"close" ^
"exit" ^
key=""ssh-keysa is my ..."""
I need enough processing from the evaluations in my pp file
winscp.com /command "open sftp://... -hostkey=""ssh-rsa ...""" "put ""C:\my file.dat"""
<- Script command 1 -> <- Script command 2 ->
PuTTY-User-Key-File-3: ssh-rsa
Encryption: aes256-cbc
Comment: rsa-key-20210917
Public-Lines: 6
AAAAB3NzaC1yc2EAAAADAQABAAABAQDoT0mVHaIHImVoOvto3EGw1mji/7Yu8Sgl
sY1o2/hpLvMR7yiz1fx8aBVbPz8XuSHQzW4InU3ZeViHa4wVP0uegV9kDMhKqkQn
lTdatKehw+jjOgVjxHgVwaTb53QwSglFYARVUWIR38Bu1wCXe9o0AHmYBaAegh80
QZ14MHWfmQHEbdToiGg3MwjW5SP917q/eaYqwSafz3gyC8hvlzrWcZQyL7y4+izU
1y38TR1liV2LXChCEmA7VFtrgS5oQCBknKCUaGK8yW6y07KYLHQKL8ZXPdfxSIez
yPWKTDYB2UgKXOBoXOOB2m+Pw7E1Zo70cGSZ5v6Yhsej3KJ15HQj
open
command it correct. That's why you can connect, but the rest of your script is not processed.
cd /
from WinSCP and transfer files manually with put
.
option batch on
option confirm off
"C:\Program Files (x86)\WinSCP\winscp.com" /command "open sftp://xxx:xxxx@sftp.xxx.com:22 -hostkey="rsa-key-20210922" -privatekey="C:\app\xxx_private.ppk" -passphrase="xxxxx""
option transfer binary
cd /simple/millnet/xxx
put "C:\app\deneme.txt"
close
exit