Novembe 18, 2000 - Folder Operations and Properties
![]() |
November 18, 2000 Folder Operations and Properties Tips: November 2000
Yehuda Shiran, Ph.D.
|
ActiveXObject() with a single argument, Scripting.FileSystemObject:
myActiveXObject = new ActiveXObject("Scripting.FileSystemObject");
You create a folder object by using the ActiveX's GetFolder() method:
myFolder = myActiveXObject.GetFolder("c:\\temp");
Here are the Folder object's properties:
Property Description AttributesRefers to the folder attributes DateCreatedReturns the folder's creation date DateLastAccessedReturns the folder's last-accessed date DateLastModifiedReturns the folder's last-modified date DriveReturns the folder's letter drive FilesReturns the folder's files collection, containing all the file objects in the folderIsRootFolderReturns true if the folder is the root folder, false otherwiseNameReturns the folder name ParentFolderReturns the folder's parent folder name PathReturns the folder's long path ShortNameReturns the folder's short name ShortPathReturns the folder's short path SizeReturns the folder size SubFolderReturns a folders collection of all folders contained in the folderTypeReturns the folder type
Here are the Folder object's methods:
Method Description Copy()Copies the folder from its parent folder or the root to another folder or the root Delete()Removes the folder Move()Moves the folder from its parent folder or the root to another folder or the root



