VerifyFile Method  
 

Verify that the contents of a file on the local system are the same as the specified file on the server.

Syntax

object.VerifyFile( LocalFile, RemoteFile )

Parameters

LocalFile
A string that specifies the name of the file on the local system.
RemoteFile
A string that specifies the name of the file on the server. This may be a resource on the server or a complete URL.

Return Value

A value of zero is returned if the operation was successful, otherwise a non-zero error code is returned which indicates the cause of the failure.

Remarks

The VerifyFile method will attempt to verify that the contents of the local and remote files are identical by comparing the size of the local file and the size of the remote file reported by the server. Although this method can be used with static content on a website, it should not be considered a reliable method for comparing all file types. Web servers may not consistently return file size information for dynamically created content such as HTML pages which use server-side includes.

It is not recommended that you use this method with text files because of the different end-of-line conventions used by different operating systems. For example, a text file on a Windows system uses a carriage-return and linefeed pair to indicate the end of a line of text. However, on a UNIX system, a single linefeed is used to indicate the end of a line. This can cause the VerifyFile method to indicate the files are not identical, even though the only difference is in the end-of-line characters that are used.

See Also

GetFile Method, GetFileSize Method, PutFile Method