Home > Language Reference > FTP Functions > FTPCurrentDir

FTPCurrentDir

The FTPCurrentDir function returns the current working folder of the connected FTP server.

Syntax

ret=FTPCurrentDir(<current_foldername>)

Parameters

<current_foldername>, string, current working folder.

Return value

Ret, optional numeric return value. If the function succeeds retrieving the current folder within 30 seconds (this default value can be changed using #FTPTimeout), the function returns 0. If the function fails, the return value is a nonzero negative value (see FTP Functions Error Codes).

See also

FTPChDir

Example

FtpConnect("www.my_site.com","ftp","MX/WH05CZE3H") 'connection to the FTP server (fake credentials!)
FtpCurrentDir(var$) ' var$ contains /
msgbox(var$)
FtpDisconnect() ' Terminates the FTP connection