Forum Discussion
TanyaYatskovska
Alumni
13 years agoHi Teemu,
As the ftp command doesn't have GUI, you'd better use the following approach:
function Test()
{
WshShell = Sys.OleObject("WScript.Shell");
executeCommand = WshShell.Run("cmd");
if (Sys.WaitProcess("cmd", 3000).Exists)
{
Sys.Process("cmd").Window("ConsoleWindowClass", "*", 1).Keys("ftp[Enter]")
Sys.Process("cmd").Window("ConsoleWindowClass", "*", 1).Keys("?")
}
}
Read the "Testing Console Applications" article for details.