Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using Searchmyfiles for .docx files

Status
Not open for further replies.

AndrewMozley

Programmer
Oct 15, 2005
621
GB
I often need to find files that I have worked on by looking for words in the file. Usually in documents (.doc, .docx), but occasionally to search for fields on a .dbf (Visual Foxpro database table) file]]

I have found Searchmyfiles from Nirsoft useful. It is quite an old product, but has produced the results I want.

Today I was trying to find which documents had a particular word in them - I was looking for an old User's guide I had written.

If I search, not by content but by name of the file (e.g. guide*.docx), that works fine. I can see a list of all the files of that name in a folder and all its sub-folders). But if I also specify a character string to search for (which is a facility offered by Searchmyfiles), only the old Word.doc files are shown, None of the relevant .docx files appear in the list.

Is there something about the way a .docx file is saved which makes it difficult to search by content?

Thanks. Andrew
 
Maybe you just need to upgrade to the latest version?

Cheers
Paul Edstein
[Fmr MS MVP - Word]
 
Thanks Paul. Grateful for your prompt reply. I am using version 2.06

When you use the later version, does it search using the contents of .docx files?
 
I've never used it. The current version is 3.10

Cheers
Paul Edstein
[Fmr MS MVP - Word]
 
2.06 ... They didn't add support for searching for text in .docx and .docm files until version 2.15 (straight from their own versions history)
 
That's it.

The x64 version understands .docx files. The non-x64 version, while it can see the existence of .docx files seems not always able to examine their contents (although it happily examines the contents of .doc files)
 
I don't know if this will help, but I use a product named AgentRansack, from Mythicsoft. It happily searches .DOCX as well as .DOC files, and also .XLSX and several other formats. I use it because it has a much simpler user interface than the native search in Windows 10 (at least, that's my opinion).

The product is free, and as available here:
Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
>seems not always able to examine their contents (although it happily examines the contents of .doc files)

.docx is not some slightly updated, extended version of .doc. As yoiu are no doubt aware, it was (and is)a completely new, XML-based format. So there would be no reason to expect that being able to read .doc means that .docx can also be read
 
From a software developer's point of view, a .DOCX is easier to search than a .DOC. At least, it doesn't need any detailed knowledge of a proprietary file format.

You can see this for yourself. Take a DOCX, and change its extension to ZIP. Then unzip it. You will see a bunch of XML files. Look for one named DOCUMENT.XML. Open it in a text editor or a browser. You should be able to see the actual text amid the XML tags. So, if a human can read the text, it should be trivial for a program to do so.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Thanks for your helpful reply, Mike.

I had thought that Searchmyfiles might be just scanning files at the lowest level. But after following your suggestion - of examining the 'subfiles' by unzipping the .docx file - one can see that it is able to avoid giving false positives by treating the formatting strings differently.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top