Does anyone know where I can find info about how to use vbscript
to put date into (or suck data out of) the following
properties of a file:
1. title, subject, author, category, keywords, comments?
2. the url to which a shortcut file links?

Thanks to whoever answers,

Marceepoo

Re: How to access file object properties (title, subject, author, category, keywords, comments, the URL to which a shortcut file links, etc. by McKirahan

McKirahan
Sat Feb 19 05:09:07 CST 2005

"Marc B. Hankin" <mbh2010@aol.com> wrote in message
news:#BhFJckFFHA.2156@TK2MSFTNGP09.phx.gbl...
> Does anyone know where I can find info about how to use vbscript
> to put date into (or suck data out of) the following
> properties of a file:
> 1. title, subject, author, category, keywords, comments?
> 2. the url to which a shortcut file links?
>
> Thanks to whoever answers,
>
> Marceepoo

Your Subject's too long -- didn't read it.

Are you talking about an HTML file or any file?

Be a little more specific.



Re: How to access file object properties (title, subject, author, category, keywords, comments, the URL to which a shortcut file links, etc. by Marc

Marc
Sat Feb 19 11:35:32 CST 2005

Dear Ms/Mr. McKirahan:

1. Shortcut files: I have a directory on my local drive containing
shortcut files. I am trying to create a script that will send to an array
both each shortcut file's fullname (name + path), and each shortcut file's
respective url target (i.e., the website on the internet) to which each
respective shortcut file points. If you right click on a shortcut file, and
then click Properties, and then select the Web Document Tab, you see a
Dialog box containing a two properties/fields (URL, and Shortcut Key) plus
some other stuff not relevant here.
I can't figure out how to get the script to access the data in
shortcut files' URL field, so that I may:
A. Echo the URL field. (Once I learn how to echo it, I'll know how
to assign the data to an array); and how to...
B. Paste new replacement data into the field, to replace the
existing URL target, if any.
2. Vbscript files: If you right click on a vbscript file, and then click
Properties, and then click the Summary Tab, you see a Dialog box containing
a set of six properties/fields (Title, subject, author, category, keywords,
comments).
I can't figure out how to get the script to:
A. Echo the contents of those six properties/fields; and how to...
B. Paste data into those six properties/fields.
Also, thanks for the feedback about lengthy subject lines. I will be
careful to make them shorter.

"McKirahan" <News@McKirahan.com> wrote in message
news:moydnbNdiMTOg4rfRVn-2g@comcast.com...
> "Marc B. Hankin" <mbh2010@aol.com> wrote in message
> news:#BhFJckFFHA.2156@TK2MSFTNGP09.phx.gbl...
>> Does anyone know where I can find info about how to use vbscript
>> to put date into (or suck data out of) the following
>> properties of a file:
>> 1. title, subject, author, category, keywords, comments?
>> 2. the url to which a shortcut file links?
>>
>> Thanks to whoever answers,
>>
>> Marceepoo
>
> Your Subject's too long -- didn't read it.
>
> Are you talking about an HTML file or any file?
>
> Be a little more specific.
>
>



Re: How to access file object properties (title, subject, author, category, keywords, comments, the URL to which a shortcut file links, etc. by McKirahan

McKirahan
Sat Feb 19 15:20:39 CST 2005

"Marc B. Hankin" <mbh2010@aol.com> wrote in message
news:#L96vlqFFHA.3888@TK2MSFTNGP12.phx.gbl...
> Dear Ms/Mr. McKirahan:
>
> 1. Shortcut files: I have a directory on my local drive containing
> shortcut files. I am trying to create a script that will send to an array
> both each shortcut file's fullname (name + path), and each shortcut file's
> respective url target (i.e., the website on the internet) to which each
> respective shortcut file points. If you right click on a shortcut file,
and
> then click Properties, and then select the Web Document Tab, you see a
> Dialog box containing a two properties/fields (URL, and Shortcut Key) plus
> some other stuff not relevant here.
> I can't figure out how to get the script to access the data in
> shortcut files' URL field, so that I may:
> A. Echo the URL field. (Once I learn how to echo it, I'll know
how
> to assign the data to an array); and how to...
> B. Paste new replacement data into the field, to replace the
> existing URL target, if any.
> 2. Vbscript files: If you right click on a vbscript file, and then click
> Properties, and then click the Summary Tab, you see a Dialog box
containing
> a set of six properties/fields (Title, subject, author, category,
keywords,
> comments).
> I can't figure out how to get the script to:
> A. Echo the contents of those six properties/fields; and how to...
> B. Paste data into those six properties/fields.
> Also, thanks for the feedback about lengthy subject lines. I will be
> careful to make them shorter.
>
> "McKirahan" <News@McKirahan.com> wrote in message
> news:moydnbNdiMTOg4rfRVn-2g@comcast.com...
> > "Marc B. Hankin" <mbh2010@aol.com> wrote in message
> > news:#BhFJckFFHA.2156@TK2MSFTNGP09.phx.gbl...
> >> Does anyone know where I can find info about how to use vbscript
> >> to put date into (or suck data out of) the following
> >> properties of a file:
> >> 1. title, subject, author, category, keywords, comments?
> >> 2. the url to which a shortcut file links?
> >>
> >> Thanks to whoever answers,
> >>
> >> Marceepoo
> >
> > Your Subject's too long -- didn't read it.
> >
> > Are you talking about an HTML file or any file?
> >
> > Be a little more specific.
> >

Will this help?
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/ht
ml/wsconmanagingshortcuts.asp

(Please don't top post.)



Re: How to access file object properties (title, subject, author, category, keywords, comments, the URL to which a shortcut file links, etc. by Marc

Marc
Sat Feb 19 16:08:51 CST 2005


"McKirahan" <News@McKirahan.com> wrote in message
news:HpidnXWXtag6MIrfRVn-3w@comcast.com...
> "Marc B. Hankin" <mbh2010@aol.com> wrote in message
> news:#L96vlqFFHA.3888@TK2MSFTNGP12.phx.gbl...
>> Dear Ms/Mr. McKirahan:
>>
>> 1. Shortcut files: I have a directory on my local drive containing
>> shortcut files. I am trying to create a script that will send to an
>> array
>> both each shortcut file's fullname (name + path), and each shortcut
>> file's
>> respective url target (i.e., the website on the internet) to which each
>> respective shortcut file points. If you right click on a shortcut file,
> and
>> then click Properties, and then select the Web Document Tab, you see a
>> Dialog box containing a two properties/fields (URL, and Shortcut Key)
>> plus
>> some other stuff not relevant here.
>> I can't figure out how to get the script to access the data in
>> shortcut files' URL field, so that I may:
>> A. Echo the URL field. (Once I learn how to echo it, I'll know
> how
>> to assign the data to an array); and how to...
>> B. Paste new replacement data into the field, to replace the
>> existing URL target, if any.
>> 2. Vbscript files: If you right click on a vbscript file, and then
>> click
>> Properties, and then click the Summary Tab, you see a Dialog box
> containing
>> a set of six properties/fields (Title, subject, author, category,
> keywords,
>> comments).
>> I can't figure out how to get the script to:
>> A. Echo the contents of those six properties/fields; and how to...
>> B. Paste data into those six properties/fields.
>> Also, thanks for the feedback about lengthy subject lines. I will be
>> careful to make them shorter.
>>
>> "McKirahan" <News@McKirahan.com> wrote in message
>> news:moydnbNdiMTOg4rfRVn-2g@comcast.com...
>> > "Marc B. Hankin" <mbh2010@aol.com> wrote in message
>> > news:#BhFJckFFHA.2156@TK2MSFTNGP09.phx.gbl...
>> >> Does anyone know where I can find info about how to use vbscript
>> >> to put date into (or suck data out of) the following
>> >> properties of a file:
>> >> 1. title, subject, author, category, keywords, comments?
>> >> 2. the url to which a shortcut file links?
>> >>
>> >> Thanks to whoever answers,
>> >>
>> >> Marceepoo
>> >
>> > Your Subject's too long -- didn't read it.
>> >
>> > Are you talking about an HTML file or any file?
>> >
>> > Be a little more specific.
>> >
>
> Will this help?
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/ht
> ml/wsconmanagingshortcuts.asp
>
> (Please don't top post.)
>
>
Thanks. It helps a lot with the Shortcut files.
Any ideas about Question #2 (reproduced below, for convenience, since I
erred earlier by top posting)?

2. Vbscript files: If you right click on a vbscript file, and then click
Properties, and then click the Summary Tab, you see a Dialog box containing
a set of six properties/fields (Title, subject, author, category, keywords,
comments).
I can't figure out how to get the script to:
A. Echo the contents of those six properties/fields; and how to...
B. Paste data into those six properties/fields.

Thanks again, Marc



Re: How to access file object properties (title, subject, author, category, keywords, comments, the URL to which a shortcut file links, etc. by Michael

Michael
Sat Feb 19 20:41:25 CST 2005

> Any ideas about Question #2 (reproduced below, for convenience, since
> I erred earlier by top posting)?
>
> 2. Vbscript files: If you right click on a vbscript file, and then
> click Properties, and then click the Summary Tab, you see a Dialog
> box containing a set of six properties/fields (Title, subject,
> author, category, keywords, comments).
> I can't figure out how to get the script to:
> A. Echo the contents of those six properties/fields; and how
> to... B. Paste data into those six properties/fields.
>

ExtendedProperty Method (ShellFolderItem) (Windows Explorer and Controls)
http://msdn.microsoft.com/library/en-us/shellcc/platform/shell/reference/objects/shellfolderitem/extendedproperty.asp?frame=true

set shellApp = createobject("shell.application")

set oItem = shellApp.Namespace("c:\").parsename("test.txt")

arPropNames = array(_
"Title",_
"Subject",_
"Author",_
"Keywords",_
"Comments",_
"Template",_
"Last Saved",_
"Revision Number",_
"Total Editing",_
"Last Printed",_
"Create Time/Date",_
"Last Saved Time/Date",_
"Number of Pages",_
"Number of Words",_
"Number of Characters",_
"Thumbnail",_
"Name of Creating Application",_
"Security"_
)

for each propname in arPropNames
s = s & propname & "=" _
& oItem.ExtendedProperty(propname) & vbcrlf
next

msgbox s

--
Michael Harris
Microsoft MVP Scripting
http://maps.google.com/maps?q=Sammamish%20WA%20US



Re: How to access file object properties (title, subject, author, category, keywords, comments, the URL to which a shortcut file links, etc. by Roland

Roland
Sun Feb 20 04:37:56 CST 2005

"Michael Harris (MVP)" <mikhar at mvps dot org> wrote in message
news:%23sn0fWvFFHA.1836@tk2msftngp13.phx.gbl...
:> Any ideas about Question #2 (reproduced below, for convenience, since
: > I erred earlier by top posting)?
: >
: > 2. Vbscript files: If you right click on a vbscript file, and then
: > click Properties, and then click the Summary Tab, you see a Dialog
: > box containing a set of six properties/fields (Title, subject,
: > author, category, keywords, comments).
: > I can't figure out how to get the script to:
: > A. Echo the contents of those six properties/fields; and how
: > to... B. Paste data into those six properties/fields.
: >
:
: ExtendedProperty Method (ShellFolderItem) (Windows Explorer and Controls)
:
http://msdn.microsoft.com/library/en-us/shellcc/platform/shell/reference/objects/shellfolderitem/extendedproperty.asp?frame=true
:
: set shellApp = createobject("shell.application")
:
: set oItem = shellApp.Namespace("c:\").parsename("test.txt")
:
: arPropNames = array(_
: "Title",_
: "Subject",_
: "Author",_
: "Keywords",_
: "Comments",_
: "Template",_
: "Last Saved",_
: "Revision Number",_
: "Total Editing",_
: "Last Printed",_
: "Create Time/Date",_
: "Last Saved Time/Date",_
: "Number of Pages",_
: "Number of Words",_
: "Number of Characters",_
: "Thumbnail",_
: "Name of Creating Application",_
: "Security"_
: )
:
: for each propname in arPropNames
: s = s & propname & "=" _
: & oItem.ExtendedProperty(propname) & vbcrlf
: next
:
: msgbox s

parsename? It appears parsename is different for TSQL, DTS and Win32/COM.
How confusing.

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp




Re: How to access file object properties (title, subject, author, category, keywords, comments, the URL to which a shortcut file links, etc. by bob

bob
Fri Mar 18 10:21:56 CST 2005





*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!