Quick References
ADO
ASP
CSS2
HTML
JavaScript
Jet SQL
VBScript
WML
WMLScript
WSH
XHTML
XML DOM
XSLT
Features
Knowledge Base
Tutorials
Partners
ZVON.ORG
XML
Planet Source Code
VisualBuilder
Web Design
Your HTML Source
XML/XSLT Forums
ASPAlliance
Scripts
Programmers Heaven
Tek-Tips Forums
Developer Fusion
Code Project
All Objects
Drive Object
Drives Collection
File Object
Files Collection
Folders Collection
OBJECT: Folder
Implemented in version 3.0
The
Folder
object allows you access and manipulate the various properties of a folder.
The following code uses the GetFolder method of the
FileSystemObject
object to obtain a
Folder
object and view one of its properties.
Code:
<%
Dim filesys, demofolder, createdate
Set filesys = CreateObject("Scripting.FileSystemObject")
Set demofolder = filesys.GetFolder("foldername")
createdate = demofolder.DateCreated
%>
PROPERTIES
Attributes
Property
This property allows us to get or change the various attributes of a file.
Syntax:
object.
Atributes
[ = newattributes]
DateCreated Property
This property gets the date and time that the folder was created.
Syntax:
object.
DateCreated
DateLastAccessed Property
Gets the date and time that the folder was last accessed.
Syntax:
object.
DateLastAccessed
DateLastModified Property
This property gets the date and time that the folder was last modified.
Syntax:
object.
DateLastModified
Drive Property
Returns the drive letter of the drive where the folder is located.
Syntax:
object.
Drive
Files Property
Returns a
Files
collection consisting of all the
File
objects in the specified folder.
Syntax:
object.
Files
IsRootFolder Property
Returns a Boolean value:
True
if the folder is the root folder, and
False
otherwise.
Syntax:
object.
IsRootFolder
Name Property
This property lets us get or change the name of the specified folder.
Syntax:
object.
Name
[ = newname]
ParentFolder Property
This property gets the parent
Folder
object relating to the specified folder.
Syntax:
object.
ParentFolder
Path Property
This property returns a folder's path.
Syntax:
object.
Path
ShortName Property
Returns the short version of a folder name (using the 8.3 convention). e.g. the folder 'testingshortname' is truncated to 'testin~1'.
Syntax:
object.
ShortName
ShortPath Property
Returns the short version of the folder path (this is the path with any folder and file names truncated as above).
Syntax:
object.
ShortPath
Size Property
Returns the size of the specified folder and its contents (in bytes).
Syntax:
object.
Size
SubFolders Property
This property returns a
Folders
collection that consists of all the folders in the specified folder.
Syntax:
object.
SubFolders
Type Property
Returns a string containing the folder type description.
Syntax:
object.
Type
METHODS
Copy
Method
Copies the specified folder from one location to another.
Syntax:
object.
Copy
destination[, overwrite]
CreateTextFile
Method
This method is used to create a text file and returns a
TextStreamObject
that can then be used to write to and read from the file.
Syntax:
object.
CreateTextFile
(filename,[, overwrite[, unicode]]))
Delete
Method
Deletes the specified folder.
Syntax:
object.
Delete
[force]
Move
Method
Moves the specified folder from one location to another.
Syntax:
object.
Move
destination
Copyright 1999-2005 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information