Chilkat
HOME
Android™
ASP
Visual Basic
VB.NET
C#
iOS (IPhone)
Objective-C
C++
C
MFC
Delphi
FoxPro
Java
Perl
PHP Extension
PHP ActiveX
Python
PowerShell
Ruby
SQL Server
VBScript
Get Information about a Specific Remote File
Demonstrates how to get information about a specific file on the FTP server.
set ftp = CreateObject("Chilkat.Ftp2")
ftp.UnlockComponent "any string begins the 30-day trial"
ftp.Username = "***"
ftp.Password = "***"
ftp.Hostname = "ftp.***.com"
ok = ftp.Connect()
if (ok <> 1) then
MsgBox ftp.LastErrorText
end if
' Get information about a specific file on the remote FTP server.
' (The filename is specified exactly with no wildcard characters)
ftp.ListPattern = "test.html"
' Does that file exist?
if (ftp.NumFilesAndDirs <> 1) then
MsgBox "File does not exist"
else
' Display the size of the file in bytes.
MsgBox ftp.GetSize(0)
end if
|
© 2000-2010 Chilkat Software, Inc. All Rights Reserved.