473,382 Members | 1,202 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Setting the Title property in a Windows File ...

I hope I am just missing something easy, and that someone can point me in
the right direction, but I cannot seem to find out how to change the title
property of any random file using VB.NET.

For example, in Notepad, with a saved text file, one can right click on the
file and go to properties, and then go to the third tab [called Summary];
here there is a property called Title, and it is this that i wish to change,
and have found ways to get close to it, but not quite.

I know I can use this command to get ahold of some data from a file:

My.Computer.FileSystem.GetFileInfo Method

But in the documentation, as well as when running the code, it doesn't say
anything about being able to get or set or see the Title property.

Granted, my main goal in all of this is to be able to enable me to write a
program so that my MP3 player will have more descriptive titles, but even if
that weren't the case, I still would like to know why I'm missing the extra
part of the data for the file and can't change it.

Any help would be great. Thanks so much for your time!

In peace.
Jun 13 '06 #1
3 6911
Hello Scott,

On 2k and XP NTFS formatted systems the "Title" attribute (as well as all
other data on the Summary tab) is stored in an Alternate data stream. (See
the MSDN doco). The reason the .NET framework doesnt expose this data (I'm
assuming) is that the .NET framework doesn't know anything about Alternate
data streams (as it's NTFS-specific).

-Boo
I hope I am just missing something easy, and that someone can point me
in the right direction, but I cannot seem to find out how to change
the title property of any random file using VB.NET.

For example, in Notepad, with a saved text file, one can right click
on the file and go to properties, and then go to the third tab [called
Summary]; here there is a property called Title, and it is this that i
wish to change, and have found ways to get close to it, but not quite.

I know I can use this command to get ahold of some data from a file:

My.Computer.FileSystem.GetFileInfo Method

But in the documentation, as well as when running the code, it doesn't
say anything about being able to get or set or see the Title property.

Granted, my main goal in all of this is to be able to enable me to
write a program so that my MP3 player will have more descriptive
titles, but even if that weren't the case, I still would like to know
why I'm missing the extra part of the data for the file and can't
change it.

Any help would be great. Thanks so much for your time!

In peace.

Jun 13 '06 #2
Hello, Scott,

But (further to what Ghost said), if you still want to try to use these
properties, you will need to use DSOFile.dll. For more information see:

http://support.microsoft.com/?kbid=224351

but to avoid problems, also take a look at:

http://www.codecomments.com/archive2...-2-813451.html

Cheers,
Randy
scott wrote:
I hope I am just missing something easy, and that someone can point me in
the right direction, but I cannot seem to find out how to change the title
property of any random file using VB.NET.

For example, in Notepad, with a saved text file, one can right click on the
file and go to properties, and then go to the third tab [called Summary];
here there is a property called Title, and it is this that i wish to change,
and have found ways to get close to it, but not quite.

I know I can use this command to get ahold of some data from a file:

My.Computer.FileSystem.GetFileInfo Method

But in the documentation, as well as when running the code, it doesn't say
anything about being able to get or set or see the Title property.

Granted, my main goal in all of this is to be able to enable me to write a
program so that my MP3 player will have more descriptive titles, but even if
that weren't the case, I still would like to know why I'm missing the extra
part of the data for the file and can't change it.

Any help would be great. Thanks so much for your time!

In peace.

Jun 13 '06 #3
Thank you both for answering... perhaps I can find a direction to go from
there.
scott.
"R. MacDonald" <sc****@NO-SP-AMcips.ca> wrote in message
news:44***********************@news.wanadoo.nl...
Hello, Scott,

But (further to what Ghost said), if you still want to try to use these
properties, you will need to use DSOFile.dll. For more information see:

http://support.microsoft.com/?kbid=224351

but to avoid problems, also take a look at:

http://www.codecomments.com/archive2...-2-813451.html

Cheers,
Randy
scott wrote:
I hope I am just missing something easy, and that someone can point me in
the right direction, but I cannot seem to find out how to change the
title property of any random file using VB.NET.

For example, in Notepad, with a saved text file, one can right click on
the file and go to properties, and then go to the third tab [called
Summary]; here there is a property called Title, and it is this that i
wish to change, and have found ways to get close to it, but not quite.

I know I can use this command to get ahold of some data from a file:

My.Computer.FileSystem.GetFileInfo Method

But in the documentation, as well as when running the code, it doesn't
say anything about being able to get or set or see the Title property.

Granted, my main goal in all of this is to be able to enable me to write
a program so that my MP3 player will have more descriptive titles, but
even if that weren't the case, I still would like to know why I'm missing
the extra part of the data for the file and can't change it.

Any help would be great. Thanks so much for your time!

In peace.


Jun 13 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: runes | last post by:
Hi, I'm trying to set the title of the console window (CMD.EXE) in Windows. I want it set to the basename of the current directory and it should stay after the script has finished. Now, the...
2
by: bagsmode | last post by:
Hi, I'm trying to set a session cookie and then redirect, however I get the error: Status: 302 Moved Location: /index.cgi I thought I recall getting an error like this when I first tried...
16
by: Picho | last post by:
Hi all, Is there any .NET way (I am not rulling out API usage) to add button(s) to a form's title bar? I found some non-.NET solutions that did actually work in VB6 but not in the ..NET...
18
by: Dixie | last post by:
Can I set the Format property in a date/time field in code? Can I set the Input Mask in a date/time field in code? Can I set the Format of a Yes/No field to Checkbox in code? I am working on...
11
by: Wolfgang Kaml | last post by:
I am not sure if this is more of an expert question, but I am sure that they are out there. I'd like to setup a general application or bin directory on my Win2003.Net Server that will hold some...
3
by: DexHex | last post by:
Hi, I am stumpt. Is there anyway to set the background image on a webpart title?
3
by: Tina | last post by:
(on the prior message the code snippet was wrong. this is the one that executes the set in a loop until a stack overflow occurrs) (using 1.1) I have the following property defined in an ascx...
10
by: Sridhar | last post by:
HI, I am having problems setting up a website so that it will be available only inside the domain. We have three servers. One is iis server and second one is internal server and the third one is...
1
by: DeanB | last post by:
Please excuse my ignorance here as I have not used WPF for long, but what is the statement that tells what the "local:" identifier is that allows a window event to call a function in a .cs file? ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.