UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Find Literal String In File Contents, Windows 7    
 
   
BruceM
post Jul 6 2016, 10:00 AM
Post#1


UtterAccess VIP
Posts: 7,022
Joined: 24-May 10
From: Downeast Maine


I do not think there is a reliable way to do what I want, but just in case I haven't stumbled on the correct search phrase:

Is there a way to use the Windows 7 search to find a literal text string within the contents of a file? I am searching a folder that has mostly word documents, looking for a text string along the lines of "01-02". However, I have not found the combination of switches, quotes, wildcards, and escape characters to replicate the search functionality of earlier versions of Windows.

It may be the numbers. I can find text, or a string containing letters and numbers, but if there are no letters I think Microsoft flounders. With the example I gave my best guess is that it finds documents that contain both "01" and "02". If they happen to be part of the literal string "01-02" that is a lucky coincidence, but since there are a good many documents that include both "01" and "02" but not "01-02", so a lot of searching has to be done one document at a time.

If there are no search results I can be reasonably confident the search string is not present in any document, but the problem comes with the false positives.
Go to the top of the page
 
DanielPineault
post Jul 6 2016, 10:37 AM
Post#2


UtterAccess VIP
Posts: 5,446
Joined: 30-June 11



Have you ever seen/tried: http://wingrep.com/download.htm ?
or
https://sourceforge.net/projects/astrogrep/
or
https://www.fileseek.ca/
Go to the top of the page
 
doctor9
post Jul 6 2016, 11:03 AM
Post#3


UtterAccess Editor
Posts: 17,910
Joined: 29-March 05
From: Wisconsin


Bruce,

Your use of the phrase "mostly Word documents" is a little concerning. Do you only want to search the Word files? Or do you want to search the other files as well? If you want to search the other files, what type of files are you talking about? It's very different searching for text in a PDF than it is in a TXT file, for example.

Dennis
Go to the top of the page
 
BruceM
post Jul 6 2016, 12:48 PM
Post#4


UtterAccess VIP
Posts: 7,022
Joined: 24-May 10
From: Downeast Maine


Hi Daniel,

Thanks for the links, but there is no chance of getting a third party tool past an IT department that is cautious to the point of paralysis.

Dennis: No need to be concerned. It is true that some folders contain files of more than one type, but my main interest is in Word files for now. Just to be clear, I am not trying to do this in Access. This is about using the search box at the top right of My Computer.
Go to the top of the page
 
DanielPineault
post Jul 6 2016, 07:55 PM
Post#5


UtterAccess VIP
Posts: 5,446
Joined: 30-June 11



See: http://answers.microsoft.com/en-us/windows...72-bb920efa4f30 perhaps it can help.
Go to the top of the page
 
DanielPineault
post Jul 6 2016, 07:57 PM
Post#6


UtterAccess VIP
Posts: 5,446
Joined: 30-June 11



Here's another method I just uncovered (can be slow though).

In the search box prefix the string you are searching for with
content:

So you'd perform a search like:
content:01-02
Go to the top of the page
 
BruceM
post Jul 11 2016, 07:16 AM
Post#7


UtterAccess VIP
Posts: 7,022
Joined: 24-May 10
From: Downeast Maine


I've been away for a few days. What I have discovered is that what I want to do is not possible. It is possible to use an escape character if searching for a file name that includes the literal character "&" (for instance). However, this functionality does not extend to searching file contents. filename:~="&" will show files with an ampersand in the file name. However, the same search except for content instead of filename will return nothing, even though the character is present in the file contents. For that matter, I cannot find a way to search for an ampersand in the file contents. I'm not trying to do that, but rather just noting that it seems not to be possible.

A content search for 01-002 will show files with 01, 02, 002, and 01-002. In other words, there are a lot of false positives. For instance, it will find any file that includes in the content a date from 2010 to the present since that includes the charcter combination "01".

From what I can tell, escape characters work only for file names, or in any case do not work for file contents. There does not seem to be a way to find in the file contents a literal string that includes numbers and hyphens. It can find a literal block of text, but with the search I am attempting Windows gets lost. It simply can't handle numbers.

As an aside, this is why I never use Bing. Microsoft makes some fine products, but I have learned not to trust its search ability other than a search within a specific file such as a Word document (which it handles quite well).

Thanks for the input, though!
Go to the top of the page
 
GilP
post Feb 5 2017, 03:27 AM
Post#8



Posts: 23
Joined: 28-March 09



Hello,
Have a look at this link:

http://stackoverflow.com/questions/5582310...and-file-search

It seems that David Fenton had developed a class module that deals with this issue and also published a sample database.
The problem is that this site is no longer available and I could not find the sample database, nor could I get in touch with him. He called his class clFileSearch. The link above contains a discussion with more links that lead to his site and to an explanation of the class module, but not to the class itself nor to the sample. And as I said the site is no longer active. If anyone can find a way to contact him or to get the sample I would also be very interested.

Best of luck
Gilad
Go to the top of the page
 
jleach
post Feb 6 2017, 09:23 AM
Post#9


UtterAccess Editor
Posts: 9,796
Joined: 7-December 09
From: Staten Island, NY, USA


Hi Gilad,

I'm afraid you're out of luck in terms of the site status and contacting David Fenton, as he passed away some years ago.

I'm unsure how to obtain a copy of this class offhand... better off considering it unavailable, I think.

Thanks,

--------------------
Go to the top of the page
 
BruceM
post Feb 6 2017, 09:53 AM
Post#10


UtterAccess VIP
Posts: 7,022
Joined: 24-May 10
From: Downeast Maine


In any case, I was hoping to find a way to do the searching without having to open a database. It used to be possible with Windows XP, as I recall. In any case, whatever limitations there may have been, the search functionality in XP was much easier to use.
Go to the top of the page
 


Custom Search
RSSSearch   Top   Lo-Fi    11th December 2017 - 02:08 PM