On May 15, 11:51 am, "Dave \"Crash\" Dummy" <inva...@invalid.invalid>
wrote:
The Shell.Application objects .GetDetailsOf() function should work to
return the "length" property ...
wsh.echo FileProperty("C:\users\tlavedas\Documents\Script\Testing\",
"chimes.wav", 27)
function FileProperty(sPath, sFileName, nProperty)
dim objShell
set oFldr = CreateObject("Shell.Application").NameSpace(sPath)
set ofile = oFldr.Parsename(sFilename)
FileProperty = oFldr.GetDetailsOf(ofile, nProperty)
end function
The value '27' is appropriate for the Length property in Win7. It is
probably different in WinXP (or not available, since it supports far
fewer). This script lists the available properties and the
corresponding number in all OS versions ...
sFolderPathspec = createobject("wscript.shell").currentdirectory
Set objShell = CreateObject ("Shell.Application")
Set objFolder = objShell.Namespace(sFolderPathspec)
Dim arrHeaders(286)
i = 0
on error resume next
do
' redim preserve arrHeaders(i)
arrHeaders(i) = i & " " & objFolder.GetDetailsOf(objFolder.Items,i)
i = i + 1
loop until err.number <> 0
on error goto 0
wsh.echo join(arrHeaders, vbcrlf)
________________________________
Tom Lavedas