banner

API.SaveFileByCSIDL method

Retrieves a file from a Uniform Resource Locator (URL) and saves it in the specified CSIDL location.

Syntax

window.external.API.SaveFileByCSIDL(sURL, iPath [,sNewFileName]);

Parameters sURL

String. Required. The URL from which to retrieve the file.

iPath

Integer. Required. The CSIDL location on the end user's computer where to save the file.

sNewFileName

String. Optional. The name under which to save this file. If you do not specify sNewFileName, the file name is the one returned by the URL.

Return Values None
Applies To window.external.API
Example
window.external.API.SaveFileByCSIDL(http://www.fabrikam.com, %WINDIR%, NewName.bmp);
Comments SaveFileByCSIDL uses the Win32 URLDownloadToFile application programming interface (API) in an asynchronous fashion.

Note

  • Make sure that you do not overwrite an existing file. Avoid saving sensitive user information.

For details on CSIDL, consult the Microsoft« Platform Software Development Kit (SDK).