|
The File object provides access to all the properties of a file.
Opens a file and returns a TextStream object. | |
Copies a file from one location to another. | |
Deletes a file. | |
Moves a file from one location to another. |
The file system attributes of a file. | |
The date and time that a file was created. | |
The date and time that a file was last accessed. | |
The date and time that a file was last modified. | |
The drive letter of the drive on which the file resides. On UNIX, this property is always '/'. | |
The name of a file. | |
The Folder object containing the file. | |
The file system path for the file. | |
The short name used by programs that require 8.3 file names. This property is not currently supported on UNIX. | |
The short path used by programs that require 8.3 file names. This property is not currently supported on UNIX. | |
The size, in bytes, of a file. | |
Information about the type of a file. This property is not currently supported on UNIX. |
The following code illustrates how to obtain a File object and how to view one of its properties.
function ShowFileInfo(filespec)
{
var fs, file, s;
fs = new ActiveXObject("Scripting.FileSystemObject");
file = fs.GetFile(filespec);
s = file.DateCreated;
Response.Write(s);
}
Copyright 2002 Sun Microsystems, Inc. All rights reserved. Legal Notice.