Hi,
We are facing issue while connecting FTP client (using Core FTP application).
using the below code:
l_txtCommand := rec."FTP Client Path" +
' -site ' + rec."Site Name" +
' -s -O -d ' + rec."Sales Directory"+ '*.*'+
' -p ' + rec."Sales Local Dir" +' -delsrc'+
' -Log ' + rec."FTP Log File Path";
WshShell.Shell(l_txtCommand, WshExec.Hide, FALSE, 0);
defined the below variables:
WshShell : Microsoft.VisualBasic.Interaction.'Microsoft.VisualBasic, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
WshExec: Microsoft.VisualBasic.AppWinStyle.'Microsoft.VisualBasic, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
but if we type the above text with variable path on command prompt then it connects the FTP without any any problem.
Unable to figure out if any windows component is missing or any NAV component missing. It is happening from one particular application server, which was rebuild recently on Windows 2008 R2 standard. The above code is running on other servers but unable to run on single server which was rebuilt recently.
Please advice with your valuable comments.
Thanks
Rati Kant
0
Answers
ProcInfo := ProcInfo.ProcessStartInfo;
ProcInfo.FileName := ExecName;
ProcInfo.Arguments := Parameters;
ProcInfo.UseShellExecute := FALSE;
ProcInfo.RedirectStandardOutput := TRUE;
ProcInfo.WindowStyle := 1; // Hidden
ProcInfo.CreateNoWindow := TRUE;
WShell:= WShell.Start(ProcInfo);
Where:
ExecName would be your rec."FTP Client Path"
In Parameters you must put the rest of the command
The dotNet vars are:
WShell DotNet System.Diagnostics.Process.'System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
ProcInfo DotNet System.Diagnostics.ProcessStartInfo.'System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'