/*
 * Sendftp.js
 * Verstuurd via (passive) ftp een bestand
 *
 * $Id$
*/
if (WScript.Arguments.length < 2)
{
    WScript.Echo("Usage: CScript sendftp.js localfile remotefilename");
    WScript.Quit();
}

var local  = WScript.Arguments(0);
var remote = WScript.Arguments(1);

oSLNKDWF = new ActiveXObject("SLNKDWF.About");

oFTP = new ActiveXObject("SLNKDWF.FTP");
oFTP.Hostname = "csmftp01.hightechcampus.nl";
oFTP.Username = "Facilitor";
oFTP.Password = "hH5Aqj3";
oFTP.Flags = 0x8000000; // INTERNET_FLAG_PASSIVE 
oFTP.Open();
oFTP.SetCurrentDir("Import");

WScript.Echo("Sending local: " + local + " to remote: " + remote);
oFTP.PutFile(remote, local);

oFTP.Close();
