Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Scripting with Windows Desktop Search

Posted on 2014-01-02
7
Medium Priority
?
357 Views
Last Modified: 2014-01-31
Hello fellow scriptwriters,

I have been tasked with creating an automated search that will return file names of office documents containing a keyword, spread over hundreds of UNC paths.

I can return the list of files in each path (using powershell), but cannot find a way to script WDS to search within the office documents and return only the file names that contain the keyword.
0
Comment
Question by:jb-smith
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 22

Expert Comment

by:Jeremy Weisinger
ID: 39752608
Are you wanting to use PowerShell?
Do you have the list of UNC paths in a txt file?
You could use something like this:
$results = foreach($uncpath in (get-content .\uncpaths.txt)){code to return query}

Open in new window

0
 

Author Comment

by:jb-smith
ID: 39752701
I would prefer PowerShell.
I have a loop that extracts data from a spreadsheet and converts to readable UNC, that was the easy part.

I am having problems scanning within office documents (I guess only WDS can do this).

The only missing component is scriping WDS.
0
 
LVL 22

Expert Comment

by:Jeremy Weisinger
ID: 39753141
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

Author Comment

by:jb-smith
ID: 39754480
Read through those same pages last week, but was holding out to see is there was some API call that would make everything easy. Something that accepted a string to search for and returned a string as the list of files found (metadata and all).
0
 
LVL 22

Accepted Solution

by:
Jeremy Weisinger earned 1500 total points
ID: 39755604
Scripting Guys to the rescue! I took another look on the Interwebs and it looks like it's possible without WDS.
https://blogs.technet.com/b/heyscriptingguy/archive/2012/08/01/find-all-word-documents-that-contain-a-specific-phrase.aspx

You should be able to adapt that for Excel and PowerPoint too.

Still a bit of a paint and the search will probably take a long time to process but it should work.
0
 

Author Comment

by:jb-smith
ID: 39766850
Well! That changes EVERYTHING! Thanks!
Will read tonight, meeting tomorrow on the progress of this script.

No time constraint on the search so this may work out well.
0
 

Author Closing Comment

by:jb-smith
ID: 39825208
OK! Based on what you posted, Jeremy, I was able to use Microsoft Interop to do everything I needed. Wow, its like a great weight was lifted from my shoulders.
0

Featured Post

Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The new Microsoft OS looks great, is easier than ever to upgrade to, it is even free.  So what's the catch?  If you don't change the privacy settings, Microsoft will, in accordance with the (EULA) you clicked okay to without reading, collect all the…
Ever notice how you can't use a new drive in Windows without having Windows assigning a Disk Signature?  Ever have a signature collision problem (especially with Virtual Machines?)  This article is intended to help you understand what's going on and…
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question