ftp/Simple.js
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | /////////////////////////////////////////////////////////////////////////////////// // // Simple // // Purpose: // Connects to remote server. // /////////////////////////////////////////////////////////////////////////////////// var obj = new ActiveXObject( "sfFTPLib.FTPConnectionSTA" ); // Settings obj.Host = "ftp.smartftp.com" ; obj.Port = 21; obj.Protocol = 0 /*ftpProtocolNormal*/ ; obj.Username = "anonymous" ; obj.Password = "test@test.com" ; obj.Passive = true ; obj.MLST = true ; //var fileLogger = obj.SetFileLogger(); //fileLogger.File = ".\\ftp.log"; obj.Connect(); WScript.Echo( "Connected" ); obj.Disconnect(); |