Re: Getting File Info using GetDetailsOf

Tech-Archive recommends: Speed Up your PC by fixing your registry



FSO actions make Norton give virus warnings.


"Steven Burn" <somewhere@xxxxxxxxxxxxxxx> wrote in message
news:eNLRkIbuGHA.3364@xxxxxxxxxxxxxxxxxxxxxxx
Why not just use FSO?

--
Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!

"scott" <sbailey@xxxxxxxxxxxxxxx> wrote in message
news:ONcHvYauGHA.4968@xxxxxxxxxxxxxxxxxxxxxxx
In CODE 2 I've got a working example from MS showing the properties of
any
files that reside in c:\temp folder.

However, I'm failing miserably in CODE 1 Vbelow when simply trying to
display the date modified property of a single file. My MsgBox displays
the
text "Date Modified" instead of the ctual datetime value of the property.
What am I doing wrong?

CODE 1 ***********

Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace("C:\temp")
sFolderTargetDate = objFolder.GetDetailsOf("test.exe", 3)

MsgBox "date stamp: " & sFolderTargetDate


CODE 2 *****************

Dim arrHeaders(35)
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace("C:\temp")
For i = 0 to 6
arrHeaders(i) = objFolder.GetDetailsOf(objFolder.Items, i)
Next
For Each strFileName in objFolder.Items
For i = 0 to 6
MsgBox i & vbtab & arrHeaders(i) _
& ": " & objFolder.GetDetailsOf(strFileName, i)
Next
Next







.



Relevant Pages

  • Re: Getting File Info using GetDetailsOf
    ... files that reside in c:\temp folder. ... Set objShell = CreateObject ... MsgBox i & vbtab & arrHeaders_ ...
    (microsoft.public.scripting.vbscript)
  • Getting File Info using GetDetailsOf
    ... files that reside in c:\temp folder. ... display the date modified property of a single file. ... Set objShell = CreateObject ... MsgBox i & vbtab & arrHeaders_ ...
    (microsoft.public.scripting.vbscript)
  • Re: MsgBox Question
    ... 'Check input folder for files and display results ... flmsg = flmsg & f1.name ... MsgBox "That folder......" ...
    (microsoft.public.scripting.vbscript)
  • Re: Exclude My Music from Folder Redirection
    ... Folder Redirection policy. ... Set objShell = CreateObject ... Set objNetwork = CreateObject ... strUsername = objNetwork.UserName ...
    (microsoft.public.windows.server.general)
  • Re: MsgBox Question
    ... MsgBox flmsg ... ' reset to the header ... I wish to have one sub folder with more ...
    (microsoft.public.scripting.vbscript)