FTP Vuser Functions (FTP) > Setting Up FTP Object

Setting Up FTP Object

For VB Script and JavaScript, FTP calls use an object.method syntax, for instance, objFTP.logon. Before making any FTP calls, that object must be created, so it is usually the first line in an action.

The name of the object is arbitrary. objFTP is used in this reference for illustration purposes, but you can use any identifier that is legal in the language you are using.

The syntax for creating the object in JavaScript is :

objFTP = objectHelper.CreateObject("LoadRunnerFtp.FtpApi.1");

 

The syntax for creating the object in VB Script is :

Set objFTP = objectHelper.CreateObject("LoadRunnerFtp.FtpApi.1")