Using Folder Properties

Microsoft® Windows® 2000 Scripting Guide

microsoft windows 2000 scripting guide

« Previous | Next »   

Because folders are COM objects, they have properties that can be retrieved and enumerated. To retrieve detailed information about a specified folder, you can use the Folder object, one of the components of the FileSystemObject. The properties of the Folder object are listed in Table 4.3.

Table 4.3   Folder Properties

PropertyDescription
AttributesBitmap containing the attributes for the folder. For more information, see "Managing Folder Attributes" later in this chapter.
DateCreatedDate that the folder was created.
DateLastAccessedDate of the last time a user accessed the contents of the folder.
DateLastModifiedDate of the last time a user modified the properties of the folder.
DriveDrive letter and trailing colon (for example, C:) representing the drive on which the folder is stored.
FilesCollection containing a file object for each file stored in the folder.
IsRootFolderBoolean value indicating whether the folder is a root folder (such as C:\).
NameFolder name, not including path information. For example, the Name of the folder C:\Windows\System32 is System32.
ParentFolderName of the folder in which this folder is stored. For example, the ParentFolder of C:\Windows\System32 is Windows; the ParentFolder of C:\Scripts is C:\.
PathFull path of the folder (for example, C:\Windows\System32).
ShortNameMS-DOS® style name of the folder, using the 8.3 naming convention. For example, the folder C:\Windows\Program Files might have the ShortName Progra~1.
ShortPathMS-DOS style path to the folder, using the 8.3 naming convention. For example, the folder C:\Windows\Program Files might have the ShortName C:\Windows\Progra~1.
SizeTotal size, in bytes, of the contents of the folder. This includes the files stored within the folder as well as all the files stored within any subfolders of the folder.
SubFoldersCollection of all the top-level subfolders contained within this folder. Subfolders contained within these subfolders are not included in the collection.
TypeString describing the folder type. This is almost always "File Folder".

send us your feedback Send us your feedback « Previous | Next »   


Microsoft Windows 2000 Scripting Guide(c) Automating System Administration 2003
Microsoft Windows 2000 Scripting Guide(c) Automating System Administration 2003
ISBN: N/A
EAN: N/A
Year: 2004
Pages: 635

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net