Host does not exist
Hi all,
I realize that there are other posts about this but I don't know if they are the same issues. It seems that one or two are.
I have come up with a very simple test harness in C# to transfer some files but I cannot get a connection. Now, when I run the following .bat file by double clicking, it works fine:
"c:\Program Files\WinSCP\WinSCP.exe" /console /script=GetSyncFilesPRERelease.txt
WHERE GetSyncFilesPRERelease.txt is as follows:
lcd C:\FTPTest
option batch on
option confirm off
option transfer binary
open ftp://<username>:<password>@<ipaddress>
get <file_list> <local_dest>
exit
However, when I run it in the following test harness, I get the "Host does not exist".
using System;
using System.Diagnostics;
namespace FTPTest
{
class Program
{
static void Main(string[] args)
{
Process p;
ProcessStartInfo psi = new ProcessStartInfo(@"C:\FTPTest\GetSyncFilesPRERelease.bat");
psi.UseShellExecute = false;
p = Process.Start(psi);
p.WaitForExit();
Console.Read();
}
}
}
Is this a known issue? Is there a work-around? I'm sure I don't need to say this but... I'm in a hurry now that I have spent some time looking into this.
Thanks a million for any help you can offer...
Evan
I realize that there are other posts about this but I don't know if they are the same issues. It seems that one or two are.
I have come up with a very simple test harness in C# to transfer some files but I cannot get a connection. Now, when I run the following .bat file by double clicking, it works fine:
"c:\Program Files\WinSCP\WinSCP.exe" /console /script=GetSyncFilesPRERelease.txt
WHERE GetSyncFilesPRERelease.txt is as follows:
lcd C:\FTPTest
option batch on
option confirm off
option transfer binary
open ftp://<username>:<password>@<ipaddress>
get <file_list> <local_dest>
exit
However, when I run it in the following test harness, I get the "Host does not exist".
using System;
using System.Diagnostics;
namespace FTPTest
{
class Program
{
static void Main(string[] args)
{
Process p;
ProcessStartInfo psi = new ProcessStartInfo(@"C:\FTPTest\GetSyncFilesPRERelease.bat");
psi.UseShellExecute = false;
p = Process.Start(psi);
p.WaitForExit();
Console.Read();
}
}
}
Is this a known issue? Is there a work-around? I'm sure I don't need to say this but... I'm in a hurry now that I have spent some time looking into this.
Thanks a million for any help you can offer...
Evan