Click here to Skip to main content
13,139,254 members (75,730 online)
Rate this:
Please Sign up or sign in to vote.
I need to add a search option to my project that will allow the user to search for a keyword in all the Word, Excel, and PDF files that are saved on a folder and it's subfolders.

I am able to get the filepath for all the txt and doc files using powershell. But when it comes to search within PDF and Xls, xlsx and csv files my tool fails.

I am currently using Visual Studio 2010 with the C# lenguage.

Things to consider.
We don't know the file names, we don't know the folder names.
We only need the file path as a result in a string.

Please provide help!

Posted 12-Jul-12 11:26am
Wes Aday 12-Jul-12 17:41pm
"my tool fails".. is not a good description of any kind of a problem. If you want to get help you should provide as much information as neccessary so that someone that is not familiar with your project could be able to help you.
maonikko 13-Jul-12 9:55am
My Tool Fails = The Powershell select-string cmdlet will not display results for Pdf Files, xlsx or csv files when I run it with C# or manually using powershell.exe

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

you've either got to develop an application that understands all the formats you want to search through - Lotus Magellan, anyone? - or use someone else's technology

MS Search seems to know quite a few formats and has an SDK[^]

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web04 | 2.8.170915.1 | Last Updated 12 Jul 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100