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 Attributes
Refers to the folder attributes DateCreated
Returns the folder's creation date DateLastAccessed
Returns the folder's last-accessed date DateLastModified
Returns the folder's last-modified date Drive
Returns the folder's letter drive Files
Returns the folder's files
collection, containing all the file
objects in the folderIsRootFolder
Returns true
if the folder is the root folder, false
otherwiseName
Returns the folder name ParentFolder
Returns the folder's parent folder name Path
Returns the folder's long path ShortName
Returns the folder's short name ShortPath
Returns the folder's short path Size
Returns the folder size SubFolder
Returns a folders
collection of all folders contained in the folderType
Returns 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