How can I update the file properties under the window file systems?

I can find the method GetDetailsof under Shell.Application.Namespace to
retrieve the file properties, but I can't find the method to update it.

Re: How To Update File properties by Highlander

Highlander
Thu Oct 18 09:27:17 PDT 2007

On Oct 17, 7:58 pm, Kam <K...@discussions.microsoft.com> wrote:
> How can I update the file properties under the window file systems?
>
> I can find the method GetDetailsof under Shell.Application.Namespace to
> retrieve the file properties, but I can't find the method to update it.

Set objFSO = CreateObject("Scripting.FileSystemObject")
sFile = "Test.txt"
Set f = objFSO.GetFile(sFile)

'~~ read-only 1
'~~ hidden 2
'~~ system 4
'~~ archive 32

'~~ Set file properties to read-only
f.attributes = 1

Set objFSO = nothing
Set f = nothing


Re: How To Update File properties by Kam

Kam
Thu Oct 18 15:45:01 PDT 2007

Thank you for the information.

but I would like to update the Title, Subject, Author and comment field.
If you right click the file under Explorer, you can find extra field under
the Summary tab.

My problem is I can't find the way to update those information via scripting.



"Highlander" wrote:

> On Oct 17, 7:58 pm, Kam <K...@discussions.microsoft.com> wrote:
> > How can I update the file properties under the window file systems?
> >
> > I can find the method GetDetailsof under Shell.Application.Namespace to
> > retrieve the file properties, but I can't find the method to update it.
>
> Set objFSO = CreateObject("Scripting.FileSystemObject")
> sFile = "Test.txt"
> Set f = objFSO.GetFile(sFile)
>
> '~~ read-only 1
> '~~ hidden 2
> '~~ system 4
> '~~ archive 32
>
> '~~ Set file properties to read-only
> f.attributes = 1
>
> Set objFSO = nothing
> Set f = nothing
>
>

Re: How To Update File properties by Mark

Mark
Fri Oct 19 07:15:53 PDT 2007

You cannot do it without using a component, DSOFile.dll.

Microsoft Developer Support OLE File Property Reader 2.1 Sample (KB 224351)

http://www.microsoft.com/downloads/details.aspx?FamilyID=9ba6fac6-520b-4a0a-878a-53ec8300c4c2&DisplayLang=en

And be careful because many of the examples on the net are for the older
version and will not work

See this page for an explanation
http://www.microsoft.com/technet/scriptcenter/resources/tales/sg0305.mspx

Regards
Mark Dormer


"Kam" <Kam@discussions.microsoft.com> wrote in message
news:7C6DB502-63C3-456A-95C3-34A01A264598@microsoft.com...
> How can I update the file properties under the window file systems?
>
> I can find the method GetDetailsof under Shell.Application.Namespace to
> retrieve the file properties, but I can't find the method to update it.
>
>