Duplicate results in Find in Files

Find, replace, find in files, replace in files, regular expressions

Duplicate results in Find in Files

Postby dtshin » Thu Mar 10, 2005 6:03 am

I just installed my new version of UltraEdit 11.00a because my 10.20 was giving me duplicate results when I was searching in files.

However, UE 11 seems to have a similar search engine.

I'm still getting duplicate results.

The criteria for "In Files/Types" is: "*.htm; *.html"

I think is the problem is that UE searches the .htm files AND THEN .html files and joins the results! When I restrict it to search *.htm files, .html files turn up in the FIND RESULTS. However searching for "*.html" files does NOT turn up .htm files.

*.h or *.ht does not turn up .htm or .html files.

Any ideas?
User avatar
dtshin
Newbie
 
Posts: 1
Joined: Thu Mar 10, 2005 12:00 am

Re: Duplicate results in Find in Files

Postby Mofi » Thu Mar 10, 2005 7:15 am

That is not a problem of UltraEdit, it is a Windows problem (since Win95). If you don't believe me, try dir *.htm at a command prompt. The dir command will also list *.html files. I guess, because the short name is something like 123456~1.htm for the files with extension .html. See the Microsoft article Command Prompt's Treatment of Long File Extensions, the CodeGuru article Work Around the Bug of "Deprecated DOS Wildcards" and also Wildcards.

Sure, UltraEdit could avoid duplicate entries, if it would first searches for filenames with *.htm and then for *.html, join the two lists and remove duplicate entries. But this will result in caching problems, because UltraEdit cannot prognose, how much memory is needed for building the file list. So it better runs the search immediately on every file found.

To avoid duplicate entries at your example simply search for "*.htm?" instead of "*.htm; *.html", because "*.htm?" finds files with both extension with only one search.
User avatar
Mofi
Grand Master
Grand Master
 
Posts: 4039
Joined: Thu Jul 29, 2004 11:00 pm
Location: Vienna


Return to Find/Replace/Regular Expressions

cron