WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

OLE COM ADO CDO ADSI LDAP
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Shell ExtendedProperty


Question:

I can't make the ExtendedProperty method work,
file='c:\somefile.ext'
fpath=filepath(file)
fname=strcat(fileroot(file),'.',fileextension(file))

oshell=objectopen('Shell.Application')
oFolder=oShell.Namespace(fpath)

oFolderIt=oFolder.ParseName(fname)

r=oFolderIt.ExtendedProperty('{F29F85E0-4FF9-1068-AB91-08002B27B3D9},4')
;r=oFolder.GetDetailsOf(oFolderIt,1)
message('b',r)
exit

GetDetailsOf works but ExtendedProperty doesn't, i tried several combinations of strings, always return 0. maybe is because returns a variant?

http://msdn.microsoft.com/library/en-us/shellcc/platform/shell/reference/objects/shellfolderitem/extendedproperty.asp

All the values for Extendedproperty are at msdn,

http://msdn.microsoft.com/library/en-us/shellcc/platform/shell/reference/structures/shcolumnid.asp

here are more values for GetDetailsOf that are not exposed at the method description,

http://www.microsoft.com/technet/scriptcenter/scrguide/sas_fil_lunl.asp

Answer:

Maybe try removing the comma before the 4 - most of the examples I see just have the CLSID then a space then a number.

User Reply:

Yes that was the problem, I changed it to the following and it resolved the problem:
r=oFolderIt.ExtendedProperty('{F29F85E0-4FF9-1068-AB91-08002B27B3D9} 4')

What is strange, is at msdn it reads "FMTID,PID"????


Article ID:   W16073
File Created: 2004:03:30:15:42:44
Last Updated: 2004:03:30:15:42:44