9 out of 17 rated this helpful Rate this topic

File Object

Windows Scripting 5.8

Provides access to all the properties of a file.

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

function ShowFileInfo(filespec)
{
   var fso, f, s;
   fso = new ActiveXObject("Scripting.FileSystemObject");
   f = fso.GetFile(filespec);
   s = f.DateCreated;
   return(s);
}

Function ShowDateCreated(filespec)
   Dim fso, f
   Set fso = CreateObject("Scripting.FileSystemObject")
   Set f = fso.GetFile(filespec)
   ShowDateCreated = f.DateCreated
End Function
Did you find this helpful?
(2000 characters remaining)
Community Content Add
Annotations FAQ