|
|
Determining File Attributes
{This script shows how to determine Windows file attributes eg: DateCreated, DateLastAccessed etc....}
var
fs, f: Variant;
begin
fs := CreateOLEObject('Scripting.FileSystemObject');
f := fs.GetFile('C:\Temp\test.pdf');
showmessage(vartostr(f.DateCreated));
end.
You should amend GetFile source eg:'C:\Temp\test.pdf' to match the file you are querying.
Property |
Description |
DateCreated |
Returns the date and time when a specified file was created |
DateLastAccessd |
Returns the date and time when a specified file was last accessed |
DateLastModified |
Returns the date and time when a specified file was last modified |
Drive |
Returns the drive letter of the drive where a specified file or folder resides |
Name |
Sets or returns the name of a specified file |
ParentFolder |
Returns the folder object for the parent of the specified file |
Path |
Returns the path for a specified file |
ShortName |
Returns the short name of a specified file (the 8.3 naming convention) |
ShortPath |
Returns the short path of a specified file (the 8.3 naming convention). |
Size |
Returns the size, in bytes, of a specified file |
Type |
Returns the type of a specified file |