Provides access to all the properties of a folder.
Sets or returns the attributes of the folders.
object.Attributes=[newAttributes As Integer)
Integer. (See Attribute
Constants
)
Read-write.
newAttributes is a new value for the attributes of a specified object.Attributes can be set for only NetWare files .
See sample in Example
Returns the date and time when the specified folder was created.
object.DateCreated
Date.
Read-only.
See sample in Example
Returns the date and time when the specified folder was last accessed.
object.DateLastAccessed
Date.
Read-only.
See sample in Example
Returns the date and time when the specified folder was last modified.
object.DateLastModified
Date.
Read-only.
See sample in Example
Returns a Files collection object containing the File objects (Section 11.4, File) present in the specified folder, including those with hidden and system file attributes set.
object.Files
Read-write.
See sample in Example
Filters specified entry in the collection object. The Default value will be *.*.
Object.Filter = [Newfilter As String]
String
Read-Write.
NewFilter is the new value added for the filter of the specified object.
See sample in Example
Returns TRUE if the specified folder is the root folder.
object.IsRootFolder
Boolean.
Read-only.
See sample in Example
Sets or returns the name of a specified folder.
object.Name[=newname As String]
String.
Read-write.
See sample in Example
Returns the folder object for the parent of the specified folder.
object.ParentFolder
Folder.
Read-only.
See sample in Example
Returns the path for a specified folder.
object.Path
String.
Read-only.
See sample in Example
Returns the short name of a folder in 8.3 naming convention.
object.ShortName
String.
Read-only.
See sample in Example
Returns the short path in 8.3 naming convention.
object.ShortPath
String.
Read-only.
See sample in Example
Returns the size in bytes, of the specified folder.
object.Size
Long.
Read-only.
See sample in Example
Returns a Folders collection with the subfolders contained in a specified folder, including those with Hidden and System file attributes set.
object.SubFolders
FoldersCollection.
Read-only.
See sample in Example
Copies a specified folder from one location to another.
object.Copy(
Destination As String
[, Overwrite As Boolean])
Boolean. Returns TRUE if the folders are successfully copied to the specified location.
The existing folders can be overwritten only in NetWare files.
If the Web-based script is not authenticated to eDirectory with appropriate rights, an error is returned.
This example copies \TEMP to Sys:\nsn.
<% Set FSO = CreateObject("Scripting.FileSystemObject")
’Returns the folder object
set Folder = FSO.GetFolder("sys:\nsn\user\temp") %>
<% ’Returns the attributes of the set file object
Response.Write Folder.Attributes %><br>
<% ’Returns the folder creation date
Response.write Folder.DateCreated %><br>
<% ’Returns the last accessed date
Response.Write Folder.DateLastAccessed %> <br>
<% ’Returns last modified date
Response.Write Folder.DateLastModified %><br>
<% ’Returns TRUE if the folder is the root folder
Response.Write Folder.IsRootFolder %><br>
<% ’Returns the parent folder name
Response.Write Folder.ParentFolder %><br>
<% ’Returns the folder path
Response.Write Folder.Path %><br>
<% ’Returns the short name of the folder
Response.Write Folder.ShortName %><br>
<% ’Returns the short path
Response.Write Folder.ShortPath %><br>
<% ’Returns the size of the folder in bytes
Response.Write Folder.Size %><br>
<% ’Returns the files object present in the set folder
Set Files = Folder.Files %>
<% ’Sets filter for printing all the file names
Folder.Filter = "*.*"
For Each File in Folder.Files
Response.Write File.Name
Next %><br>
<% ’Sets filter for printing file names with .bat extension’
Folder.Filter = "*.bas"
For Each File in Folder.Files
Response.Write File.Name
Next %><br>
<% ’Returns the folders object containing collection of sub
folders
set Folders = Folder.SubFolders %>
<% ’Returns the number of folders in the collection object
Response.Write Folders.Count %><br>
<% ’Copies the folder to UTIL directory
Response.Write Folder.Copy ("Sys:\nsn\util\") %><br>
<% ’Renames the folder as TEST
Response.Write Folder.Name = "TEST" %>
Creates a specified file name and returns a TextStream object (Section 11.3, TextStream) that can be used to read from or write to a file.
object.CreateTextFile(
FileName As String [,
OverWrite As Boolean [,
Unicode As Integer]])
If the Web-based script is not authenticated to eDirectory with appropriate rights, an error is returned.
This example creates TEST.TXT (or overwrites if it exists) in Unicode format.
<% Set FSO = CreateObject("Scripting.FileSystemObject")
set Folder = Folders.CreateTextFile("sys:nsn\user\test.txt", TRUE, TRUE)%>
Deletes a specified folder.
object.Delete([
Force As Boolean])
Boolean.Returns TRUE if the folders are successfully deleted from the specified location.
The existing folders with read-only attributes can be deleted only in NetWare files.
If the Web-based script is not authenticated to eDirectory with appropriate rights, an error is returned.
This example returns TRUE, and will delete SYS:\NSN\SAMPLE even if it has read-only attributes.
<% Set FSO = CreateObject("Scripting.FileSystemObject") %>
<% ’Deletes a folder sample in NSN under Sys:
Response.Write FSO.DeleteFolder("sys:\nsn\sample") %>
Moves a specified folder from one location to another.
object.Move(
Destination As String)
Boolean. Returns TRUE if the folders are successfully moved.
This example moves the fodler TEMP from \UTIL to SYS:\NSN\UTIL.
<% Set FSO = CreateObject("Scripting.FileSystemObject")
’Moves the folder TEMP from USER to UTIL directory
Response.Write
FSO.MoveFolder("sys:\nsn\user\temp","sys:\nsn\util\") %>