Topic "Host does not exist when connecting via script or shell co.."

Author Message
gpiebob
[View user's profile]

Joined: 2013-01-17
Posts: 1
Location: CMI
I have a bit of an issue. All I want to do is synchronize a local directory to my ftp server at regular intervals. I can do this manually through the command window, but when I try to automate it fails.

I have tried the following using Windows 7 Task Scheduler and WinSCP portable:

1: Have the task scheduler open winscp.com at a certain time, passing the arguments: command "open user:pass@ipaddress:22" "synchronize both local_address server_address" "exit"

2: Have the task scheduler open winscp.exe with the same arguments

3: Have the task scheduler open either winscp.com or winscp.exe with the argument: "script=script.txt" .
The script's contents are:
#connect
open dreamedit
#sync
synchronize both C:\Users\Matt\Desktop\cfjdimg /var/www/html/cfjdimg


4: Open the script in winscp via run or command prompt

5: drag and drop script file onto either winscp runtime file

No matter what, the same thing happens: a window opens that says "Searching for host...", then it fails and says "Host does not exist"

I even did all of the above a second time, but saved a session with the credentials saved (not secure, but whatever, if it were to work) and have the open command reference the session instead of the user:pass@ip:port. Still the same: "Searching for host..." "Host does not exist".

In that window that opens (I've removed the exit command to leave it open) I can manually enter the open command (either with user:pass@ip:port or referring to the saved session) and it will connect to my ftp server with no issues.

Why won't scripting and scheduling work? I've searched the forums but found no answer that benefits me yet, except the notion that perhaps I should use an older version of WinSCP.

Any thoughts? I'm sure I'm missing something obvious and it's staring me in the face (that's a normal day for me).
script error.PNG (40.67 KB) [Download]

Description: a related visual of the script to be ran in notepad and winscp.com attempting to run it

Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
Please read FAQ:
https://winscp.net/eng/docs/faq_scheduler

If that does not help, come back.
Guest




I'm getting the same error.

If I try to run a script file from command line, I get the "Host does not exits" error when I type the commands in the same commandline it work's fine.

I don't think this is related to credentials.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
Anonymous wrote:
I'm getting the same error.

If I try to run a script file from command line, I get the "Host does not exits" error when I type the commands in the same commandline it work's fine.

I don't think this is related to credentials.

Please attach a log file for both scenarios.
_________________
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