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:\D ata\MyFile.wmv" );
Response.Write( "Location :" + file.FullName + "<BR/>" +
"Size :" + file.Length + "<BR/>" +
"Created :" + file.CreationTi me + "<BR/>" +
"Modified :" + file.LastWriteT ime + "<BR/>" +
"Accessed :" + file.LastAccess Time + "<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 9053
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.c om 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******** ******@TK2MSFTN GP04.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:\D ata\MyFile.wmv" );
Response.Write( "Location :" + file.FullName + "<BR/>" +
"Size :" + file.Length + "<BR/>" +
"Created :" + file.CreationTi me + "<BR/>" +
"Modified :" + file.LastWriteT ime + "<BR/>" +
"Accessed :" + file.LastAccess Time + "<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******** ******@TK2MSFTN GP04.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:\D ata\MyFile.wmv" );
|
| Response.Write( "Location :" + file.FullName + "<BR/>" +
| "Size :" + file.Length + "<BR/>" +
| "Created :" + file.CreationTi me + "<BR/>" +
| "Modified :" + file.LastWriteT ime + "<BR/>" +
| "Accessed :" + file.LastAccess Time + "<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 the responding application
(this method was to slow for my needs).
The other way was using the dsofile.dll from microsoft. With that, first, it
seemed to work.
|
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 sExt = LCase(sFile).Substring(sFile.LastIndexOf("."))
If sExt = ".jpg" Or sExt = ".gif" Then
Response.Write("ShowBitMapProp<br>" & vbCrLf)
|
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 as well. Also does anyone
know how to use shell32 to search the keywords? Any help would be greatly
appreciated.
Imports Shell32
Imports Shell32.ShellFolderItemClass
|
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 info>
</stockitem>
<stockitem>
|
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 like to import
those into an Access table for processing. I've written VBS macros in
the past to import data from Excel sheets into Access tables, but the
same functionality does not appear to be available for Word. Any clues
or sample code...
| |
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 key_set={"ami\0","inc\0","lud\0"};
#define MAX_KW_SIZE 10
#define MAX_OCUR 100
|
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 from the html page
(replace the words in the html page with blank space) I'm new to python
and could use a little push in the right direction, any ideas on how to
implement this?
Thanks!
|
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 and look in Properties,
Summary. In VBA I'm able to get at this informatio using Dsofile.dll --
found on a MS site somewhere.
It looks like I'd like to use My.Computer.FileSystem, but I can't seem to
find out how to get what I need.
I'd...
|
by: sam |
last post by:
same as subject?
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| | |