Sideway BICK BlogSideway BICK BLOG from Sideway

A Sideway to Sideway Home

Link:http://output.to/sideway/default.asp?qno=180600001

Script, Scripting Language, VBScript elements, Server-Side VBScript Object Element Property FileSystemObject Folder

VBScript Properties of FSO Folder Object

Some typical predefined Elements are.

  • FSO Folder Object:
    • Attributes Property: Read/Write Value
    • DateCreated Property: Read-only Value
    • DateLastAccessed Property: Read-only Value
    • DateLastModified Property: Read-only Value
    • Drive Property: Read-only Value
    • Files Property ≡ Files Collection
    • IsRootFolder Property
    • Name Property
    • ParentFolder Property
    • Path Property
    • ShortName Property
    • ShortPath Property
    • Size Property
    • SubFolders Property
    • Type Property

Attributes Property

last updated 12/16/2017

is to set, if optional newattributes is given and attribute is a read/write attribute, or to return the attributes of a folder or file of associated Folder or File Object.

Syntax

fsofolderobjvar.Attributes [= newattributes]
fsofileobjvar.Attributes [= newattributes]

Argument

fsofolderobjvar | fsofileobjvarRequired. to specify the associated Object instance reference.AttributesRequired Keyword. to specify the Property of associated Object.newattributesOptional. If provided, newattributes is the new value for the attributes of the specified object.

Settings

newattributes argument:

ConstantValueDescriptionNormal0Normal file. No attributes are set.ReadOnly1Read-only file. Attribute is read/write.Hidden2Hidden file. Attribute is read/write.System4System file. Attribute is read/write.Volume8Disk drive volume label. Attribute is read-only.Directory16Folder or directory. Attribute is read-only.Archive32File has changed since last backup. Attribute is read/write.Alias1024Link or shortcut. Attribute is read-only.Compressed2048Compressed file. Attribute is read-only.

Remarks

  • Always the name of a File or Folder object.

Applied to

Folder Object, File Object

DateCreated Property

last updated 12/16/2017

is to return the date and time that the folder or file of associated Folder or File Object was created.

Syntax

fsofolderobjvar.DateCreated
fsofileobjvar.DateCreated

Argument

fsofolderobjvar | fsofileobjvarRequired. to specify the associated Object instance reference.DateCreatedRequired Keyword. to specify the Property of associated Object.

Remarks

  • The object is always a File or Folder object.

Applied to

Folder Object, File Object

DateLastAccessed Property

last updated 12/16/2017

is to return the date and time that the folder or file of associated Folder or File Object was last accessed.

Syntax

fsofolderobjvar.DateLastAccessed
fsofileobjvar.DateLastAccessed

Argument

fsofolderobjvar | fsofileobjvarRequired. to specify the associated Object instance reference.DateLastAccessedRequired Keyword. to specify the Property of associated Object.

Remarks

  • The object is always a File or Folder object.

Applied to

Folder Object, File Object

DateLastModified Property

last updated 12/16/2017

is to return the date and time that the folder or file of associated Folder or File Object was last modified.

Syntax

fsofolderobjvar.DateLastModified
fsofileobjvar.DateLastModified

Argument

fsofolderobjva | fsofileobjvarrRequired. to specify the associated Object instance reference.DateLastModifiedRequired Keyword. to specify the Property of associated Object.

Remarks

  • The object is always a File or Folder object

Applied to

Folder Object, File Object

Drive Property

last updated 12/16/2017

is to return the drive letter of a drive on which the folder or file of associated Folder or File Object resides.

Syntax

fsofolderobjvar.Drive
fsofileobjvar.Drive

Argument

fsofolderobjvar | fsofileobjvarRequired. to specify the associated Object instance reference.DriveRequired Keyword. to specify the Property of associated Object.

Remarks

  • The object is always a File or Folder object.

Applied to

Folder Object, File Object

Files Property

last updated 12/16/2017

is to return a Files Collection consisting of all File objects including those with hidden and system file attributes in a folder of associated Folder Object,

Syntax

fsofolderobjvar.Files

Argument

fsofolderobjvarRequired. to specify the associated Object instance reference.FilesRequired Keyword. to specify the Property of associated Object.

Remarks

  • The object is always a Folder object.

Applied to

Folder Object

IsRootFolder Property

last updated 12/16/2017

is to return a Boolean value indicating the folder of associated Folder Object is a root folder with True or is not with False.

Syntax

fsofolderobjvar.IsRootFolder

Argument

fsofolderobjvarRequired. to specify the associated Object instance reference.IsRootFolderRequired Keyword. to specify the Property of associated Object.

Remarks

  • The object is always a Folder object.

Applied to

Folder Object

Name Property

last updated 12/16/2017

is to set, if optional newname is given, or to return the name of a folder or file of associated Folder or File Object.

Syntax

fsofolderobjvar.Name [= newname]
fsofileobjvar.Name [= newname]

Argument

fsofolderobjvar | fsofileobjvarRequired. to specify the associated Object instance reference.NameRequired Keyword. to specify the Property of associated Object.newnameOptional. If provided, newname is the new name of the specified object.

Remarks

  • The object is always a File or Folder object.

Applied to

Folder Object, File Object

ParentFolder Property

last updated 12/16/2017

is to return the parent folder of a folder of file of the associated Folder or File Object.

Syntax

fsofolderobjvar.ParentFolder
fsofileobjvar.ParentFolder

Argument

fsofolderobjvar | fsofileobjvarRequired. to specify the associated Object instance reference.ParentFolderRequired Keyword. to specify the Property of associated Object.

Remarks

  • The object is always a File or Folder object.

Applied to

Folder Object, File Object

Path Property

last updated 12/15/2017

is to return the path of a drive, folder, or file of associated Drive, Folder, or File Object.

Syntax

fsodriveobjvar.Path
fsofolderobjvar.Path
fsofileobjvar.Path

Argument

fsodriveobjvar | fsofolderobjvar | fsofileobjvarRequired. to specify the associated Object instance reference.PathRequired Keyword. to specify the Property of associated Object.

Remarks

  • The object is always a File, Folder, or Drive object.
  • For drive letters, the root drive is not included. For example, the path for the C drive is C:, not C:\.

Applied to

Drive Object, Folder Object, File Object

ShortName Property

last updated 12/16/2017

is to return the short name of the associated Folder or File Object for programs require the earlier 8.3 naming convention.

Syntax

fsofolderobjvar.ShortName
fsofileobjvar.ShortName

Argument

fsofolderobjvar | fsofileobjvarRequired. to specify the associated Object instance reference.ShortNameRequired Keyword. to specify the Property of associated Object.

Remarks

  • The object is always a File or Folder object.

Applied to

Folder Object, File Object

ShortPath Property

last updated 12/16/2017

is to return the short path of the associated Folder or File Object for programs require the earlier 8.3 naming convention.

Syntax

fsofolderobjvar.ShortPath
fsofileobjvar.ShortPath

Argument

fsofolderobjvar | fsofileobjvarRequired. to specify the associated Object instance reference.ShortPathRequired Keyword. to specify the Property of associated Object.

Remarks

  • The object is always a File or Folder object.

Applied to

Folder Object, File Object

Size Property

last updated 12/16/2017

is to return the size in btyes of a folder including all files and subfolders, or a file of corresponding associated Folder or File Object.

Syntax

fsofolderobjvar.Size
fsofileobjvar.Size

Argument

fsofolderobjvar | fsofileobjvarRequired. to specify the associated Object instance reference.SizeRequired Keyword. to specify the Property of associated Object.

Remarks

  • The object is always a File or Folder object.

Applied to

Folder Object, File Object

SubFolders Property

last updated 12/16/2017

is to retrun a Folders collection of all folders including those with hidden and system file attributes set inside a folder of associated Folder Objecter.

Syntax

fsofolderobjvar.SubFolders

Argument

fsofolderobjvarRequired. to specify the associated Object instance reference.SubFoldersRequired Keyword. to specify the Property of associated Object.

Remarks

  • The object is always a Folder object.

Applied to

Folder Object

Type Property

last updated 12/16/2017

is to return the type of a folder or file of associated Folder or File Object..

Syntax

fsofolderobjvar.Type
fsofileobjvar.Type

Argument

fsofolderobjvar | fsofileobjvarRequired. to specify the associated Object instance reference.TypeRequired Keyword. to specify the Property of associated Object.

Remarks

  • The object is always a File or Folder object.

Applied to

Folder Object, File Object

Sideway BICK Blog

01/06


Copyright © 2000-2020 Sideway . All rights reserved Disclaimerslast modified on 26 January 2013