Opt In (Do Not Edit Here)

May 31, 2011

Demo - Folder Object


  

FileSystemObject Demo – Folder Object

1.     Declare two variables.

     Dim FSO, Folder

2.    Now create an instance of FileSystemObject and access the Folder in the computer System.
           
      FSO = Server.CreateObject("Scripting.FileSystemObject")


 Folder = FSO.GetFolder("C:\Program Files\Microsoft Visual Studio 9.0\")

3.    Now display the Information for Folder  

     Response.Write("<b>Demo - Folder Object </b>")
    

'Retrieve the Name of the Folder
Response.Write("<br/>Folder Name: " + Folder.Name)

'Retrieve the Size(in Bytes), Type & Attributes of the Folder
Response.Write("<br/>Size: " + Folder.Size.ToString + " Bytes")
Response.Write("<br/>Type: " + Folder.Type)
Response.Write("<br/>Attributes: " + Folder.Attributes.ToString)

'Retrieve the Time Stamp of Selected Folder
Response.Write("<br/>DateCreated: " + Folder.DateCreated)
Response.Write("<br/>DateLastAccessed: " + Folder.DateLastAccessed)
Response.Write("<br/>DateLastModified: " + Folder.DateLastModified)

'Retrive the No. of Files and Subfolders of Selected Folder
Response.Write("<br/>Files: " + Folder.Files.Count.ToString)
Response.Write("<br/>SubFolders: " + Folder.SubFolders.Count.ToString)

'Retrieve the Path information of the Folder    
Response.Write("<br/>IsRootFolder: " + Folder.IsRootFolder.ToString)
Response.Write("<br/>Path: " + Folder.Path)
Response.Write("<br/>ShortName: " + Folder.ShortName)
Response.Write("<br/>ShortPath: " + Folder.ShortPath)


4.    The Output will be as follows…..














                     

About The Author :

Freelancer and IT Engineer
Softwares Developed by Mayur Dighe ImmortalDotNet.WordPress.com

0 comments :

All Rights Reserved. 2014 Copyright SIMPLITONA

Powered By Blogger | Published By Gooyaabi Templates Designed By : BloggerMotion

Top