I use the Windows Scripting Host under Win2kAS to FTP send/receive files using NCFTP. I chose NCFTP because it handles communication failures gracefully and because it supports lots of command line options.
Here's a part of a .JS script file that I use to send files. Its all very basic but it might get you started if you want to use NCFTP:
Code:
function SendFileByFTP( strFName )
{
var strCMD, oShell, RetValue;
//Build NCFTP command line
strCMD = "\"" + strFtpAppFullPath + "\""; //Full path to FTP prog
strCMD += " -u " + strFtpUserName; //Username
strCMD += " -p " + strFtpPassword; //Password
strCMD += " -P " + strFtpPort; //Remote Port
strCMD += " -t " + intFtpTimeout; //Timeout
strCMD += " -V"; //No progress meter
strCMD += " -r " + intFtpRetryCount; //# Retries
strCMD += " -S .tmp" //Rename after upload hp123456.ord.tmp -> hp123456.ord
strCMD += " -E "; //Regular PORT connection
//strCMD += " -F "; //Use PASV
//strCMD += " -DD "; //Delete local file if successful
if (boolFtpEnableDebug = true) //Check if debug enabled in db
{
strCMD += " -d " + strFtpDebugFilename; //Local debug filename
}
strCMD += " " + strFtpIP; //RemoteHost's IP
strCMD += " " + strFtpDropDir; //Remote dir
strCMD += " " + strFName; //Filename to send
oShell = new ActiveXObject ("WScript.shell");
//oShell.run ("cmd /K CD C:\\temp & " + strCMD,1,true);
//Execute the cmd line, window mode, pause (this) script while running
RetValue = oShell.run (strCMD,1,true);
return( RetValue );
}