Right-click on a file (e.g. a .wmv file) in Windows Explorer and there's the
"General" tab with Date Created, Attributes (i.e. whether the file is read
only or and.or hidden), and other properties. I can get at these values
programatically via the System.IO namespace and the FileInfo method:
FileInfo file = new FileInfo(@"C:\Data\MyFile.wmv");
Response.Write("Location :" + file.FullName + "<BR/>" +
"Size :" + file.Length + "<BR/>" +
"Created :" + file.CreationTime + "<BR/>" +
"Modified :" + file.LastWriteTime + "<BR/>" +
"Accessed :" + file.LastAccessTime + "<BR/>" +
"Attributes :" + file.Attributes + "<BR/>" +
"Extension :" + file.Extension + "<BR>");
But (on many files when you right-click), there is also a "Summary" tab with
Title, Subject, Keywords, Comments, etc. How can I read these values
programatically?
Thanks,
Ron 2 9028
Hi Ron,
Those properties differ by file type. Currently, there is no fully managed
way to get these properties, AFAIK. Do a search on groups.google.com and
you'll find some information. IIRC, there is some API functions you can
use.
--
Dave Sexton http://davesexton.com/blog
"Ronald S. Cook" <rc***@westinis.comwrote in message
news:u7**************@TK2MSFTNGP04.phx.gbl...
Right-click on a file (e.g. a .wmv file) in Windows Explorer and there's
the "General" tab with Date Created, Attributes (i.e. whether the file is
read only or and.or hidden), and other properties. I can get at these
values programatically via the System.IO namespace and the FileInfo
method:
FileInfo file = new FileInfo(@"C:\Data\MyFile.wmv");
Response.Write("Location :" + file.FullName + "<BR/>" +
"Size :" + file.Length + "<BR/>" +
"Created :" + file.CreationTime + "<BR/>" +
"Modified :" + file.LastWriteTime + "<BR/>" +
"Accessed :" + file.LastAccessTime + "<BR/>" +
"Attributes :" + file.Attributes + "<BR/>" +
"Extension :" + file.Extension + "<BR>");
But (on many files when you right-click), there is also a "Summary" tab
with Title, Subject, Keywords, Comments, etc. How can I read these values
programatically?
Thanks,
Ron
Hi,
There is no support for that in the framework, you will have ot P/invoke
some win functions for that.
Before I suggest you to make a search in the usual sites ( sourceforge.net ,
codeproject.com, etc) to see if anybody implemented this before.
IIRC this was done using an alternate (or secondary) storage stream in the
file. Also look in the archives to get a better explanation of how this is
implemented.
--
Ignacio Machin
machin AT laceupsolutions com
"Ronald S. Cook" <rc***@westinis.comwrote in message
news:u7**************@TK2MSFTNGP04.phx.gbl...
| Right-click on a file (e.g. a .wmv file) in Windows Explorer and there's
the
| "General" tab with Date Created, Attributes (i.e. whether the file is read
| only or and.or hidden), and other properties. I can get at these values
| programatically via the System.IO namespace and the FileInfo method:
|
| FileInfo file = new FileInfo(@"C:\Data\MyFile.wmv");
|
| Response.Write("Location :" + file.FullName + "<BR/>" +
| "Size :" + file.Length + "<BR/>" +
| "Created :" + file.CreationTime + "<BR/>" +
| "Modified :" + file.LastWriteTime + "<BR/>" +
| "Accessed :" + file.LastAccessTime + "<BR/>" +
| "Attributes :" + file.Attributes + "<BR/>" +
| "Extension :" + file.Extension + "<BR>");
|
| But (on many files when you right-click), there is also a "Summary" tab
with
| Title, Subject, Keywords, Comments, etc. How can I read these values
| programatically?
|
| Thanks,
| Ron
|
| This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Markus Brenner |
last post by:
Hi there!
Hope anybody can help. I want to at least read (maybe write) the extended
file properties of office documents like winword, excel, ....
I've tried two ways till now, one by opening...
|
by: Joaquin Corchero |
last post by:
Hi, I have this code which it should change the EXIF file properties of
images, but there is something that doesn't work, any ideas???
Private Sub ShowBitMapProp(ByVal sFile As String)
Dim...
|
by: Steve Mauldin |
last post by:
I am trying to get from files the keywords saved as part of the properties
under the summary tab. I am able to get the Title, and Comments using the
following code but I need to get the keywords...
|
by: Emmanuel |
last post by:
Hi there,
My client would like to process an xml file. the structure of which is as
below.
<xml>
<stockitem>
<releaseddate>.....date value...</releaseddate>
<...aditional tags for additional...
|
by: a.crowley |
last post by:
I have a large set of Word documents that I wish to catalogue in an
Access database. Each document has a set of file properties populated
(title, subject, author, keywords, comments ect), so I'd...
|
by: amit |
last post by:
Hi guys!I am trying to write a program which will segregate some
selected keywords from a given file.The source code is given alongwith
#include<stdio.h>
#include<string.h>
char...
|
by: DH |
last post by:
Hi,
I'm trying to strip the html and other useless junk from a html page..
Id like to create something like an automated text editor, where it
takes the keywords from a txt file and removes them...
|
by: =?Utf-8?B?QXJ0?= |
last post by:
I need to go through a folder and all of its subfolders and collect the
Title, Comments, Keywords and a few other items. These are items that you
see when you select a file in the Windows explorer...
|
by: sam |
last post by:
same as subject?
|
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
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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: 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: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
| | |