Click to return to the Networking, Protocols     
FTP Protocol     Predefined Protocols    
Web Workshop  |  Networking, Protocols & Data Formats

File Protocol


Opens a file on a local or network drive.

Syntax

file:///sDrive|sFile

Possible Values

sDriveRequired. Specifies the local or network drive.
sFile Optional. Specifies the file to open. If sFile is omitted and the account accessing the drive has permission to browse the directory, a list of accessible files and directories is displayed.

Remarks

The File protocol and sDrive parameter can be omitted and substituted with just the command line representation of the drive letter and file location. For example, to browse the My Documents directory, the File protocol can be specified as file:///C|/My Documents/ or as C:\My Documents\. In addition, a single '\' is equivalent to specifying the root directory on the primary local drive. On most computers, this is C:\.

Available as of Microsoft® Internet Explorer 3.0 or later.

Example

The following sample demonstrates four ways to use the File protocol.

Specifying a drive and a file name.

file:///C|/My Documents/ALetter.html

Specifying only a drive and a path to browse the directory.

file:///C|/My Documents/

Specifying a drive and a directory using the command line representation of the directory location.

C:\My Documents\

Specifying only the directory on the local primary drive.

\My Documents\


Back to topBack to top

Did you find this topic useful? Suggestions for other topics? Write us!

© 1999 Microsoft Corporation. All rights reserved. Terms of use.