Windows 7 search the Windows 7 index programmatically (where do I put the SQL)

Michael J Moore

New Member
Joined
Mar 25, 2013
Messages
2
I would like to [h=3]Querying the Index Programmatically (Windows) and I found this link that shows
several ways to do it. Basically, I have hundreds of ten-digit numbers and about 300
excel documents. I want to know which documents contain which numbers. I don't care if the
output goes to a terminal screen or a file, I just need a quick and dirty way to know which
excel docs contain a given number. From what I've read, the SQL approach seems
easiest, but WHERE do I TYPE in the SQL command? I've download the Win SDL hoping
it would have some kind of SQL command prompt window, but if it's there, I couldn't find it.
TIA,[/h]Mike

.
 


It looks like you are interested in querying the index programmatically in Windows to find out which Excel documents contain specific ten-digit numbers. Here's a breakdown of how you can achieve this:

1. Using Windows Search with SQL Queries:
- Windows Search allows you to use Structured Query Language (SQL) queries to search for specific content within files. This method involves crafting SQL queries to search for your ten-digit numbers within the Excel documents.
- The SQL queries are executed using the Windows Search platform behind the scenes, so you won't find a traditional SQL command prompt window to input queries.

2. Executing SQL Queries:
- To execute SQL queries for searching within Excel documents, you can use the Windows Command Prompt or PowerShell.
- You will need to use the Select statement to query the index for specific numbers within the Excel files. For example:
Code:
sql
     SELECT System.ItemName, System.DateModified FROM your_directory WHERE CONTAINS(*, 'your_ten_digit_number')
- Replace your_directory with the path to the folder containing your Excel files and your_ten_digit_number with the specific number you are searching for.

3. Output:
- The results of the SQL query can be displayed on the terminal screen. If you want to save the output to a file, you can redirect the output using > to save it to a text file.
- For example, to save the output to a file named output.txt, you can use:
Code:
bash
     your_sql_query > output.txt

4. Using Win SDK:
- The Windows Software Development Kit (Win SDK) provides tools for developing Windows applications. It might not have a specific SQL command prompt.

5. Final Steps:
- Ensure that your SQL query is correctly crafted to search for the specific ten-digit numbers within the Excel documents.
- Execute the query in the Command Prompt or PowerShell to retrieve the desired information.

By following these steps, you should be able to utilize SQL queries to find out which Excel documents contain the numbers you are interested in. Feel free to ask if you need more detailed instructions or further assistance!
 


Back
Top