Click here to Skip to main content
15,897,273 members
Please Sign up or sign in to vote.
1.00/5 (1 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!

Thanks...
Posted
Comments
[no name] 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

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[^]
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900