Code Script .co.uk

Home | Scripts | Tutorials | Disclaimer | Sitemap | Contact

   Folder Object
 

Vbs / Folder Object


Set objFSO= CreateObject("Scripting.FileSystemObject")
Set objFolder = objFSO.GetFolder("foldername")


FILE OBJECT PROPERTIES

Attributes - get or change the various attributes of a file.

objFolder.Atributes [ = newattributes]

DateCreated - date and time that the folder was created.

objFolder.DateCreated

DateLastAccessed - date and time that the folder was last accessed.

objFolder.DateLastAccessed

DateLastModified - date and time that the folder was last modified.

objFolder.DateLastModified

Drive - drive letter of the drive where the folder is located.

objFolder.Drive

Files - a Files collection consisting of all the File objects in the folder.

objFolder.Files

IsRootFolder - a Boolean value. True if the folder is the root folder, and False otherwise.

objFolder.IsRootFolder

Name - get or change the name of the specified folder.

objFolder.Name [ = newname]

ParentFolder - the parent Folder object relating to the specified folder.

objFolder.ParentFolder

Path - a folder's path.

objFolder.Path

ShortName - short version of a folder name

objFolder.ShortName

ShortPath - short version of the folder path

objFolder.ShortPath

Size - size of the specified folder and its contents (in bytes).

objFolder.Size

SubFolders - a Folders collection that consists of all the folders in the specified folder.

objFolder.SubFolders

Type -  the folder type description.

objFolder.Type





Please note that a disclaimer applies to any code on this page.
 
   Actions
  Go Back
  Bookmark
  Print Page


   Menu
 
- Links
- Reference
- Script Editors
- Tutorials
- Vbscript