Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / October 2006

Tip: Looking for answers? Try searching our database.

Change file comments

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
jman - 10 Oct 2006 17:11 GMT
I've been asked to develop an application which, on some certain stage
during its execution, must take some text files on disk and change their
"comments" property, which is easily accessed from windows explorer, just by
clicking properties and writing them down, so I assume there must be some
framework or Win32 API function or whatever to accomplish that.

I'm aware of the FileVersionInfo class, but help states only executable
files have version info, and that text files don't, so I guess there must be
some other way.

If any of you know about this, I'd be most grateful, since I need this very
urgently.

Thanks.
Gaurav Vaish (www.EdujiniOnline.com) - 10 Oct 2006 18:17 GMT
> during its execution, must take some text files on disk and change their
> "comments" property, which is easily accessed from windows explorer, just
> by

Comments on a plain-text (.txt) file? That would be a news for me... at
least for non-Vista OS!

Signature

Happy Hacking,
Gaurav Vaish | www.mastergaurav.com
www.edujinionline.com
http://eduzine.edujinionline.com
-----------------------------------------

jman - 11 Oct 2006 08:41 GMT
>> during its execution, must take some text files on disk and change their
>> "comments" property, which is easily accessed from windows explorer, just
>> by
>
> Comments on a plain-text (.txt) file? That would be a news for me... at
> least for non-Vista OS!

Just get any .txt file you have on disk, right click on it and then on
properties, and you'll find with I'm talking about. I think it's the
"Summary" tab (don't lnow the exact name, since I use Windows in Spanish).
There, you have some metadata, like comments, author, title, and so on.
That's the info I was talking about.

Anyway, I got the solution. Look for the reply I've just posted under the
other guy who replied
Peter Duniho - 10 Oct 2006 18:59 GMT
> I've been asked to develop an application which, on some certain stage
> during its execution, must take some text files on disk and change their
[quoted text clipped - 3 lines]
> files have version info, and that text files don't, so I guess there must
> be some other way.

I believe that FileVersionInfo is looking at the executable file itself,
which contains in its header the information returned by the FileVersionInfo
class.  So you're right, this isn't what you want.

For the "Summary" information you're trying to retrieve, as far as I know
there's no .NET support for it (which seems odd, so I might have missed
something).  You can probably use interop to get at it easily though, as
it's a COM/OLE thing:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/stg/stg/the_sum
mary_information_property_set.asp


Pete
jman - 11 Oct 2006 08:37 GMT
>> I've been asked to develop an application which, on some certain stage
>> during its execution, must take some text files on disk and change their
[quoted text clipped - 16 lines]
>
> Pete

Thanks to Google Groups, I got the answer yesterday. It's quite tricky and
you must rely on com interfaces, but it works like a charm (but a bit slow)

The info is here:
http://groups.google.es/group/microsoft.public.win2000.developer/browse_thread/t
hread/19430c8069527483/99a5dd5c80c084b5?lnk=st&q=c%23+file+comments&rnum=1#99a5d
d5c80c084b5


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.