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

Advertisement

gpiebob
Joined:
Posts:
1
Location:
CMI

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

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).

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

script error.PNG

Reply with quote

Advertisement

Guest

Same error

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.

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
41,468
Location:
Prague, Czechia

Re: Same error

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.

Reply with quote

Advertisement

You can post new topics in this forum