FTPCurrentDir

FTP function.

The FTPCurrentDir function returns the FTP current folder.

Syntax

FTPCurrentDir(<current_folder>)
or
ret=FTPCurrentDir(<current_folder>)

Parameter

<current_folder> : string, returns the name of the current folder in use on the already connected FTP server.

Return value

Ret, numeric return code. The return code is 0 when the current folder has been successfully retrieved. The non zero possible error codes for FTP errors are listed in FTP functions error codes topic. During #FTPTimeout seconds, the function tries to retrieve the name of the current folder and after this timeout, the standard error management is used.

See also

FTPChDir, FTPMkDir, FTPRmDir, FTPExistDir

Example

 

FtpConnect("www.wintask.com","ftp","MX/WH05CZE3h") ' connection to the FTP server www.wintask.com (fake credentials!)

FtpCurrentDir(var$) ' var$ contains /

FtpDisconnect() ' Terminates the FTP connection