Returns the name of last file accessed by an FTP function (File Transfer Protocol).
is useful when browsing files on an FTP server with FTPListFile
// Name of last file accessed by an FTP function
ResName = FTPName()
<Result>: Character string
- Name of last file accessed by an FTP function. This file was modified by one of the following FTP functions: FTPAttribute, FTPDate, FTPTime, FTPSize, FTPListFile.
- Empty string ("") if an error occurred. To get more details on the error, use ErrorInfo with the errMessage constant.
Request to FTP server
FTPName sends no request to the FTP server.
By default, all the FTP functions fail if the FTP server does not respond within 20 seconds. This timeout can be modified with FTPConnect
when connecting to the FTP server.
Rights of users
Only a user who has read rights on the FTP server can retrieve the names of the files found on an FTP server. In most cases, the read rights are granted to the "anonymous" users.
The call to this function modifies the permissions required by the application.
Required permission : INTERNET
This permission allows the applications to open the network sockets.