The File object provides access to all the properties of a file.
Property/Method
Description
Attributes
Refers to the attributes of the file
Copy()
Copies a file from one location to another
DateCreated
Returns the date a file was created
DateLastAccessed
Returns the date a file was last accessed
DateLastModified
Returns the date a file was last modified
Delete()
Removes a file
Drive
Returns the drive on which a file exists
Move()
Moves a file from one location to another
Name
Returns the name for a file
OpenAsTextStream()
Opens a text stream for a file
ParentFolder
Returns the parent folder name for a file
Path
Returns the path to a file
ShortName
Returns the shortname of the file
ShortPath
Returns the shortpath of the file
Size
Returns the size of a file
Type
Returns the file type
<html> <body> <script language="JavaScript"> <!-- var myObject, f; myObject = new ActiveXObject("Scripting.FileSystemObject"); f = myObject.GetFile("c:\test.txt"); document.write("The name of the file is: " + f.Name);