Sun Chili!Soft ASP Sun Chili!Soft
ASP Sun Microsystems

 

VBScript File Object

The VBScript File object provides access to all the properties of a file.

Methods: VBScript File Object

VBScript File Object Copy Method

Copies a file from one location to another.

VBScript File Object Delete Method

Deletes a file.

VBScript File Object Move Method

Moves a file from one location to another.

VBScript File Object OpenAsTextStream Method

Opens a file and returns a TextStream object.

Properties: VBScript File Object

VBScript File Object Attributes Property

The attributes of a file.

VBScript File Object DateCreated Property

The date and time that the file was created.

VBScript File Object DateLastAccessed Property

The date and time that the file was last accessed.

VBScript File Object DateLastModified Property

The date and time that the file was last modified.

VBScript File Object Drive Property

The drive letter of the drive on which the file resides.

VBScript File Object Name Property

The name of the file.

VBScript File Object ParentFolder Property

The Folder object for the parent of the file.

VBScript File Object Path Property

The file system path to the file.

VBScript File Object ShortName Property

The short name used by programs that require 8.3 names. This property is not currently supported on UNIX.

VBScript File Object ShortPath Property

The short path use by programs that require 8.3 names. This property is not currently supported on UNIX.

VBScript File Object Size Property

The size, in bytes, of a file.

VBScript File Object Type Property

Information about the type of a file. This property is not currently supported on UNIX.

Remarks: VBScript File Object

The following code illustrates how to obtain a File object and how to view one of its properties.

Sub ShowFileInfo(filespec)

Dim fs, f, s

Set fs = CreateObject("Scripting.FileSystemObject")

Set f = fs.GetFile(filespec)

s = f.DateCreated

Response.Write s

End Sub

Copyright 2002 Sun Microsystems, Inc. All rights reserved. Legal Notice.