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

Searching file on disk


Hi,

How I can find all files on my disk which meets next criteria:
- it is Word doc
- it is smaller then 100K
- Author = "John Smith"
- DocType = "test" <- Custom properties

Thanks,

Jovo

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 21 '05 #1
6 908
Jovo,

First you will have to use this clas in my opinion to get your first
selection.

http://msdn.microsoft.com/library/de...mberstopic.asp

Than you have with officeautomation to open the file to get the attribute
Author.

Office
http://support.microsoft.com/default...b;EN-US;311452

http://msdn.microsoft.com/office/

Pia Download
http://www.microsoft.com/downloads/d...displaylang=en

I hope this helps?

Cor
Nov 21 '05 #2

You mean that I must every time open all files to read properites? :(

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 21 '05 #3
Jovo,
You mean that I must every time open all files to read properites? :(


Did I write that, you dont have to open it only when you want to know the
author.
First you can use the fileinfo class in my opinion.

Cor
Nov 21 '05 #4
"Jovo Mirkovic" <yo**@sezampro.yu> schrieb:
How I can find all files on my disk which meets next criteria:
- it is Word doc
- it is smaller then 100K
- Author = "John Smith"
- DocType = "test" <- Custom properties


For enumerating the files:

FileSystemEnumerator
<URL:http://dotnet.mvps.org/dotnet/samples/filesystem/FileSystemEnumerator.zip>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #5
"Jovo Mirkovic" <yo**@sezampro.yu> schrieb:
You mean that I must every time open all files to read properites? :(


No! Eduardo A. Morcillo [MVP] has a sample on his website
(<URL:http://mvps.org/emorcillo/>):

OLE Structured Storage Class
<URL:http://mvps.org/emorcillo/dotnet/grl/net_storage.zip>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #6

Thanks to all, especially to Herfried, that is it!

Jovo Mirkovic

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 21 '05 #7

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

Similar topics

4
by: Michi | last post by:
I was wondering what the best solution is for making large numbers of TEXT (or BLOB?) fields searchable. For example, if I have a forum, what is the best way to be able to search for specific...
10
by: Bing Du | last post by:
Greetings, Our former SQL Server 2000 DBA backed up everything in a single disk file. By everything I mean, full backup, differential backup and transaction logs. See below for details of how...
7
by: Joseph | last post by:
Hi, I'm having bit of questions on recursive pointer. I have following code that supports upto 8K files but when i do a file like 12K i get a segment fault. I Know it is in this line of code. ...
1
by: uwebay | last post by:
Hello, I am searching the second diskette (out of 12) of Borland C++ 3.1. I own the original, but the disk is neither readable nor repairable. Who is so friendly and sends me the contents as ZIP...
9
by: Jon LaBadie | last post by:
Suppose I'm using stdio calls to write to a disk file. One possible error condition is no space on file system or even (in unix environment) a ulimit of 0 bytes. Which calls would be expected to...
4
by: Hunk | last post by:
Hi I have a binary file which contains records sorted by Identifiers which are strings. The Identifiers are stored in ascending order. I would have to write a routine to give the record given...
20
by: Seongsu Lee | last post by:
Hi, I have a dictionary with million keys. Each value in the dictionary has a list with up to thousand integers. Follow is a simple example with 5 keys. dict = {1: , 2: , 900000: , 900001:...
4
by: jodleren | last post by:
Hi! I wonder, which way to do this fastest. I have a disk, where I need to search for a file or directory. I do it recursively, meaning that I start from the top dir, then I add all...
12
by: glennanthonyb | last post by:
Hi The company I work for has finally woken up to data security on our field laptops. I'm writing something in C# that will allow remote deletion of sensitive data and I don't believe...
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: 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...
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
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,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
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 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.