Previous PageNext Page

8.9 File Object

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

Methods

Copy
 
Copies a file from one location to another.
 
Delete
 
Deletes a file.
 
Move
 
Moves a file from one location to another.
 
OpenAsTextStream
 
Opens a file and returns a TextStream object.
 

Properties

Attributes
 
The attributes of a file.
 
DateCreated
 
The date and time that the file was created.
 
DateLastAccessed
 
The date and time that the file was last accessed.
 
DateLastModified
 
The date and time that the file was last modified.
 
Drive
 
The drive letter of the drive on which the file resides.
 
Name
 
The name of the file.
 
ParentFolder
 
The Folder object for the parent of the file.
 
Path
 
The file system path to the file.
 
ShortName
 
The short name used by programs that require 8.3 names. This property is not currently supported on UNIX.
 
ShortPath
 
The short path use by programs that require 8.3 names. This property is not currently supported on UNIX.
 
Size
 
The size, in bytes, of a file.
 
Type
 
Information about the type of a file. This property is not currently supported on UNIX.
 

Remarks

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 © 2000 Chili!Soft

Previous PageTop Of PageNext Page