vtiGetDocToFile

C++: long vtiGetDocToFile(LPCTSTR pszURL, LPCTSTR pszFilename);
VB: vtiGetDocToFile(URL as String, FileName as String) as Long

Description

This method retrieves a document from the current web or the Internet and saves it to a local file.

If the given URL is absolute (such as http://webserver/web/page.htm), the document will be fetched with an HTTP GET operation, even if the document is in the current web. Otherwise, if the URL is relative and in the current web, the page will be fetched via the FrontPage Server Extensions.

The call blocks until the file is finished downloading.

Return Value

The return value is currently 1 for success and 0 for failure, but this may change to include other status codes in the future.

Parameters

URL designates a document in the current web or on the Internet. Examples: “index.htm”, “images/undercon.gif”, “test.doc”, “http://www.microsoft.com/”.

FileName is an absolute pathname where the file should be saved. Examples: “C:\temp\index.htm”, “C:\temp\undercon.gif”, “C:\temp\test.doc”.