FileSystemObject: get data form files
files and folders
DateLastModified, DateLastAccessed, DateCreated, Drive, Name, ParentFolder,Path, ShortName, ShortPath, Size, Type, Attributes

File Related data:

DateLastModified, DateLastAccessed, DateCreated, Drive, Name, ParentFolder,Path, ShortName, ShortPath, Size, Type, Attributes
 
 
 

Get file related data
<% 
Set fso = CreateObject("Scripting.FileSystemObject") 
Set a = fso.GetFile(Server.MapPath("\") & "\index.asp") 

Response.Write ("DateLastModified: "  & a.DateLastModified & "<BR>")
Response.Write ("DateLastAccessed: "  & a.DateLastAccessed & "<BR>")
Response.Write ("DateCreated: "  & a.DateCreated & "<BR>")
Response.Write ("Drive: "  & a.Drive & "<BR>")
Response.Write ("Name: "  & a.Name & "<BR>")
Response.Write ("ParentFolder: "  & a.ParentFolder & "<BR>")
Response.Write ("Path: "  & a.Path & "<BR>")
Response.Write ("ShortName: "  & a.ShortName & "<BR>")
Response.Write ("ShortPath: "  & a.ShortPath & "<BR>")
Response.Write ("Size: "  & a.Size & "<BR>")
Response.Write ("Type: "  & a.Type & "<BR>")
Response.Write ("Attributes: "  & a.Attributes & "<BR>")

Set fileObject = Nothing 
Set fso = Nothing 
%>


Output
DateLastModified: 3/15/2002 3:03:32 AM
DateLastAccessed: 4/15/2002 7:45:01 AM
DateCreated: 4/1/2002 1:55:11 PM
Drive: e:
Name: index.asp
ParentFolder: E:\clientsites\codedcode.com
Path: E:\clientsites\codedcode.com\index.asp
ShortName: index.asp
ShortPath: E:\clientsites\ASPTUT~1.INF\index.asp
Size: 359
Type: ASP auto file
Attributes: 32

Folder Related data:

DateLastModified, DateLastAccessed, DateCreated, Drive, Name, ParentFolder, Path, ShortName, ShortPath, Size, Type, Attributes, IsRootFolder, (get list of Folder/files)
 
 

>
Get folder related data
<% 
Set fso = CreateObject("Scripting.FileSystemObject") 
Set a = fso.GetFolder(Server.MapPath("\tryit\")) 

Response.Write ("DateLastModified: "  & a.DateLastModified & "<BR>")
Response.Write ("DateLastAccessed: "  & a.DateLastAccessed & "<BR>")
Response.Write ("DateCreated: "  & a.DateCreated & "<BR>")
Response.Write ("Drive: "  & a.Drive & "<BR>")
Response.Write ("Name: "  & a.Name & "<BR>")
Response.Write ("ParentFolder: "  & a.ParentFolder & "<BR>")
Response.Write ("Path: "  & a.Path & "<BR>")
Response.Write ("ShortName: "  & a.ShortName & "<BR>")
Response.Write ("ShortPath: "  & a.ShortPath & "<BR>")
Response.Write ("Size: "  & a.Size & "<BR>")
Response.Write ("Type: "  & a.Type & "<BR>")
Response.Write ("Attributes: "  & a.Attributes & "<BR>")
Response.Write ("IsRootFolder: "  & a.IsRootFolder & "<BR>")

' to get list of files here
' to get list of folders here

Set a = Nothing 
Set fso = Nothing 
%>


Output
DateLastModified: 4/15/2002 7:23:17 AM
DateLastAccessed: 4/15/2002 7:23:20 AM
DateCreated: 2/4/2002 3:39:18 AM
Drive: e:
Name: prueba
ParentFolder: E:\clientsites\codedcode.com
Path: E:\clientsites\codedcode.com\tryit
ShortName: tryit
ShortPath: E:\clientsites\AspPk.INF\tryit
Size: 43940
Type: File Folder
Attributes: 48
IsRootFolder: False

 




Google






   



MSN Nick Name



More Resources...





Most Viewed Services:
  1. HTML Tutorial
  2. XHTML Tutorial
  3. CSS Tutorial
  4. Javascript Tutorial
  5. DHTML Tutorial
  6. VB Script
  7. TCP/IP Tutorial
  8. ADO Tutorial
  9. MYSQL Tutorial
  10. ASP Tutorial
  11. AJAX Tutorial
  12. CFML Tutorial
  13. PHP Tutorial
  14. WML Tutorial
  15. FLASH Tutorial
  16. XML Tutorial
  17. RSS Tutorial
  18. SQL Tutorial
  19. HTML Articles
  1. Javascript Articles
  2. PHP Articles
  3. SEO Articles
  4. Web Design Articles
  5. SEO Tips
  6. Web Design Tips
  7. Articles
  8. CSS
  9. CSS Tips
  10. HTML Tips
  11. JAVASCRIPT Tips
  12. MYSQL Tips
  13. PHP Tips
  14. Money
  15. Tutorials
  16. Web Hosting



  • Home
  • Web Directory
  • Top Directoriers
  • Webmaster Directories
  • Contact
  • © Copyright 2006-2010 All Rights Reserved By CodeDcode.Com : HTML : RSS : TEXT : XML