microsoft.public.scripting.vbscript - Microsoft Office Project
I need to obtain the extended file properties, such as Owner, Title, etc, for a file in a .net program. I have looked through the FileInfo class and I cannot see any methods or properties that will expose this. In the old days we used to use GetFileInfo but I don't see it in .Net anywhere. How can I get this information? Thanks, T
I have searched the forum for tips on how to get extended file properties, but haven't had any luck yet. What I'm after specifically is version information, such as that found when a file is right-clicked in Windows Explorer, then under the Version tab. The number given for Product Version would be perfect. I need to get this information using only VBScript if possible. I know about GetDetailsOf, but have not been able to get that to give me version. It may be that what I'm trying to do is not possible. Also, is there a list somewhere that shows all the columns available with GetDetailsOf? I saw a page at Microsoft that only had 4 or 5, but I've seen some code that went up to 33 or so. Thanks in advance for any help.
Hi, Using some code I found on the web I can read the Extended file properties. Some of the properties are clearly read only, but how can I change the ones which aren't? <code> Function GetFileInformation() As Boolean On Error GoTo ErrorHandler Dim arrHeaders(35) Set objShell = CreateObject("Shell.Application") Set objfolder = objShell.Namespace("C:\TestFolder") For i = 0 To 34 arrHeaders(i) = objfolder.GetDetailsOf(objfolder.Items, i) Next For Each strFileName In objfolder.Items For i = 0 To 34 Debug.Print i & vbTab & arrHeaders(i) & ": " _ & objfolder.GetDetailsOf(strFileName, i) Next Next GetFileInformation = True Exit Function ErrorHandler: MsgBox "Unable to process data in Function 'GetFileInformation' due to:" & vbCrLf & Err.Description, vbCritical Err.Clear GetFileInformation = False End Function ' GetFileInformation </code> Regards Laurie Comerford
I'm trying to figure out, using VB6, how to obtain extended file properties. The properties I'm concerned with are the properties that appear on the Summary tab when you right-click a file (such as a .txt file) and select properties. I need to obtain items such as "Author", "Title", "Keywords", "Comments", etc. Also, if the file is an image (.jpg, etc.) there are extended image properties (perhaps windows generates these on the fly??) that I'm interested in. Does anyone know how to get this info? Thanks in advance, Jeff