473,383 Members | 1,922 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,383 software developers and data experts.

MetaData in .txt and .doc

Ivo
Hi,
I need help with creating .txt and .doc files form c#. I know how to create
these files so that they contain the text I want, but besides that text, I
also need to write metadata (hope that the term is right) to these files.
That means that I have a string 'title', a string 'author' and a string
'date' that I need to "attach" to the file. Off course, these information
(title, author and date) should not be written "into the file", but to be
available for seeing when someone rightclicks on the file, and then goes to
summary tab. I apologize if this or a question very much like this has
already been asked. Unfortunatley, I don't have the time to browse through
the enitre group.
Thanks.
Mar 2 '07 #1
5 6518
Ivo,
Regarding your comment about "not having enough time to browse", here's a
sample search on "Metadata doc":

http://msdn.microsoft.com/newsgroups...xp=&sloc=en-us

you can do the same with Google or Live.com.

I don't think it is possible to attach "metadata" to a text file. Word "doc"
files support the metadata you see when you right - click on a file in
Windows Explorer and choose the various tabs. You can find out how to add
this data programmatically by studying the Word API.
Peter

--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net


"Ivo" wrote:
Hi,
I need help with creating .txt and .doc files form c#. I know how to create
these files so that they contain the text I want, but besides that text, I
also need to write metadata (hope that the term is right) to these files.
That means that I have a string 'title', a string 'author' and a string
'date' that I need to "attach" to the file. Off course, these information
(title, author and date) should not be written "into the file", but to be
available for seeing when someone rightclicks on the file, and then goes to
summary tab. I apologize if this or a question very much like this has
already been asked. Unfortunatley, I don't have the time to browse through
the enitre group.
Thanks.
Mar 2 '07 #2
Ivo

"Peter Bromberg [C# MVP]" <pb*******@yahoo.yabbadabbadoo.comwrote in
message news:F5**********************************@microsof t.com...
Ivo,
Regarding your comment about "not having enough time to browse", here's a
sample search on "Metadata doc":

http://msdn.microsoft.com/newsgroups...xp=&sloc=en-us

you can do the same with Google or Live.com.

I don't think it is possible to attach "metadata" to a text file. Word
"doc"
files support the metadata you see when you right - click on a file in
Windows Explorer and choose the various tabs. You can find out how to add
this data programmatically by studying the Word API.
Peter

--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net
Ok, thanks alot.
Mar 2 '07 #3
On Fri, 2 Mar 2007 04:22:00 -0800, Peter Bromberg [C# MVP]
<pb*******@yahoo.yabbadabbadoo.comwrote:

>I don't think it is possible to attach "metadata" to a text file.
Peter
There is something called an "Alternate Data Stream" which could be
used to do this, however it is an NTFS-specific feature and not widely
known.

http://www.bleepingcomputer.com/tuto...utorial25.html
"Though ADS was created for compatibility with the Mac world, it is
not solely used for that purpose. Many applications use ADS to store
attributes of a file in them. For example if you make a text document,
and right click and go into its properties you will see a summary
page. This summary information is attached to the file via ADS. I will
show you more on that later and applications to see this information.

In summary, think of ADS as hidden files that are attached to the
visible ones. The main reason they are so dangerous is that they are
not well known, are generally hidden to the user, and that there are
few security programs that can recognize them."


--
Philip Daniels
Mar 2 '07 #4
Hi,

"Ivo" <iv************@OVOgmail.comwrote in message
news:es**********@news1.carnet.hr...
Hi,
I need help with creating .txt and .doc files form c#. I know how to
create these files so that they contain the text I want, but besides that
text, I also need to write metadata (hope that the term is right) to these
files. That means that I have a string 'title', a string 'author' and a
string 'date' that I need to "attach" to the file. Off course, these
information (title, author and date) should not be written "into the
file", but to be available for seeing when someone rightclicks on the
file, and then goes to summary tab. I apologize if this or a question very
much like this has already been asked. Unfortunatley, I don't have the
time to browse through the enitre group.
Thanks.
That is not supported in the framework, you will have to P/invoke it, google
the archives for "Alternate streams"
Mar 2 '07 #5
Ivo
"Ignacio Machin ( .NET/ C# MVP )" <machin TA laceupsolutions.comwrote in
message news:uJ**************@TK2MSFTNGP03.phx.gbl...
Hi,

"Ivo" <iv************@OVOgmail.comwrote in message
news:es**********@news1.carnet.hr...
>Hi,
I need help with creating .txt and .doc files form c#. I know how to
create these files so that they contain the text I want, but besides that
text, I also need to write metadata (hope that the term is right) to
these files. That means that I have a string 'title', a string 'author'
and a string 'date' that I need to "attach" to the file. Off course,
these information (title, author and date) should not be written "into
the file", but to be available for seeing when someone rightclicks on the
file, and then goes to summary tab. I apologize if this or a question
very much like this has already been asked. Unfortunatley, I don't have
the time to browse through the enitre group.
Thanks.

That is not supported in the framework, you will have to P/invoke it,
google the archives for "Alternate streams"
Will do so, thanks to you and Philip.
Mar 2 '07 #6

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

Similar topics

1
by: Useko Netsumi | last post by:
Does anyone aware of any program/apps/scripts that has the ability to modify/add/create/delete metadata in any image type such as JPEG, GIF, PNG, etc. Question for the experts, is it wise to...
1
by: Brett Selleck | last post by:
I would like to start collecting Metadata on my XML schemas. I have searched the web for a method of automatically extracting Metadata from an XSD file and have come up empty handed. Basically what...
1
by: Santhu | last post by:
What is the difference between METADATA and MANIFEST and where do they get stored? Thank you
1
by: Jonathan Gibbs | last post by:
I'm very new to xml, and struggling a bit.. I want to use an .xsd file passed to a windows application to define a dataset's schema, and also (if possible) pass other metadata associated with...
2
by: Tomas Vera | last post by:
Hello All (This is being cross-posted to the C++ group), I've started receiving the subject message during a compile of a C++ based interface module used in my C# based WebApp. This module...
2
by: GoodDay | last post by:
MC++ application, I've got "LNK2022 error message... MyApp error LNK2022: metadata operation failed (8013118D) : Inconsistent method declarations in duplicated types(CMainFramel). (0x02000008). ...
1
by: Laurent Lequenne | last post by:
Hello There, I just converted a VS 2003 C++ Project into VS 2005. I already made some changes in my headers files, has I had compilations errors with enums declarations. Now everything compiles...
2
by: EP | last post by:
I'm looking for a method by which to access Windows files metadata and have not been able to find anything in the standard modules or via Google - what is the standard approach? Shamefully I...
3
by: Peter Kirk | last post by:
Hi in relational databases we have in general such things as "tables", "columns", "primary keys", "foreign keys". Are there corresponding entities in the xml world? Xml is used to represent...
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: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.