Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

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

Indeed, there's neither password nor key in your script. So no wonder that the script does not authenticate.

In any case, do not try to debug your batch file by running it from Windows Explorer. That way it's hard to spot any errors. Run the batch file from the Command Prompt – cmd. And enable logging in WinSCP (/log=...).

See also https://winscp.net/eng/docs/troubleshooting#scripting
Mister H

I think your open command is wrong. You have:
open sftp://user:thomas_rubin@Trueprojekte.com/...

It should be:
open sftp://thomas_rubin:PASSWORD@Trueprojekte.com/...
True Photo

Hi Martin
Believe me, before I posted here I tried out all instructions you propose me – for example first I installed an ssh-rsa key in ssh/authorized_keys and ssh/Kown_hosts and then I tried a bat file:
open sftp://user:thomas_rubin@Trueprojekte.com/ -hostkey="ssh-rsa 1024 SHA256:zUuCjtsADWTct5/GqA0z0rRpBIxxxxxxxxxxxxx th-ru@HP"
# Change remote directory
cd /httpdocs/foto/blogs
# Download file to the local directory E:\foto\blogs
get Leancanvas_Bildschoen.pdf E:\foto\blogs
# Disconnect
close
# Exit WinSCP
exit

On the screen WinSCP flashes for less than a second and then nothing happens, Leancanvas_Bildschoen.pdf is not transferred. When opening WinSCP again, it starts at .../blog

That's why I asked for help and hope now, you tell me where the bug is
Thanks
True Photo

Task scheduling

Hi
I'm trying to establish a cron job in the Windows 11 Task Scheduler. It should open the remote server (trueprojekte.com) at the root (/httpdocs/foto) and connect to the local folder (E:\foto) and then do the synchronization from the remote server towards E:\foto.
Til now I only did simple jobs in the scheduler, this one is too complicated for me. Would anybody be so kind and describe it for me?
Thanks
Thomas
(using the latest version of WinSCP on Windows 11 actual version)