Thread: FSO question
View Single Post
  #3 (permalink)  
Old February 23rd, 2005, 01:22 PM
mmcdonal mmcdonal is offline
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

It does support LastModified, but it is a WMI call, not an FSO call. Here is a start:

'==========
stSQL = "SELECT * FROM Win32_Directory WHERE Name = " & stNewFolder
stComputer = "."
Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonat e}!\\" & stComputer & "\root\cimv2")
Set colFolders = objWMIService.ExecQuery(stSQL)
For Each objFolder In colFolders
    WScript.Echo "Last Modified: " & objFolder.LastModified
Next
'==========

The problem is that the user has to type in the full path and then the path needs to look like this:

C:\\Documents and Settings

Not C:\Documents and Settings.

I could write this, but it would take some time and the user would still have to type in the full path. Maybe you can look in VB.Net and see if anyone has done this. I think I will do one to grab all the properties from a folder explorer.

Here are the properties:
Archive
Caption
Compressed
CompressionMethod
CreationDate
Encrypted
EncryptionMethod
Hidden
IsUseCount
LastAccessed
LastModified
Name
Path
Readable
System
Writeable

This probably doesn't help. Sorry.

mmcdonal
Reply With Quote