Find Files: How to search only a range of filenames?

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
pesto12601
Posts: 20
Joined: 04 Mar 2012 20:56

Find Files: How to search only a range of filenames?

Post by pesto12601 »

Hi.. thought I had figured this out but the search a) only works occasionally and b) doesn't hit the correct filename when it does work.

So - I have a location path defined as: \\Network\PT\REQ and within this folder is about 12000 html files all in sequence order (ie: 1.htm, 2.htm,..., 12000.htm). I would like to search only a range of htm files at a time.. for example: 10400.htm - 10500.htm and find "the" within these files (which should appear in every file).

I setup the find as:
Name: : >= 10450.htm AND < 10500.htm
folder: \\Network\PT\REQ

Contents tab: the

When I run the search, it appears to only search files: 105.htm, 1046.htm, 1047.htm, 1048.htm, 1049.htm and 1050.htm

Why? I thought it was because of how the filename are stored in windows... with 105.htm appearing perhaps between 10499.htm and 10500.htm.. but then, why don't the other files get searched as well?

Anyway... any help would be appreciated. I typically use File Locator Pro to do these type of searches.. but cannot find a way to use a filename range... and no friendly forum like XYPlorer exists for the product :)

Txh!

serendipity
Posts: 3358
Joined: 07 May 2007 18:14
Location: NJ/NY

Re: Find Files: How to search only a range of filenames?

Post by serendipity »

pesto12601 wrote:Hi.. thought I had figured this out but the search a) only works occasionally and b) doesn't hit the correct filename when it does work.

So - I have a location path defined as: \\Network\PT\REQ and within this folder is about 12000 html files all in sequence order (ie: 1.htm, 2.htm,..., 12000.htm). I would like to search only a range of htm files at a time.. for example: 10400.htm - 10500.htm and find "the" within these files (which should appear in every file).

I setup the find as:
Name: : >= 10450.htm AND < 10500.htm
folder: \\Network\PT\REQ

Contents tab: the

When I run the search, it appears to only search files: 105.htm, 1046.htm, 1047.htm, 1048.htm, 1049.htm and 1050.htm

Why? I thought it was because of how the filename are stored in windows... with 105.htm appearing perhaps between 10499.htm and 10500.htm.. but then, why don't the other files get searched as well?

Anyway... any help would be appreciated. I typically use File Locator Pro to do these type of searches.. but cannot find a way to use a filename range... and no friendly forum like XYPlorer exists for the product :)

Txh!
Just making sure if you have double space between AND? See this help file note:

Code: Select all

Find all items from "d.txt" through "m.txt". Watch the double space after AND: Boolean " AND " must be surrounded by spaces as well! The leading ":" is the inline Boolean search mode marker.
: >= d.txt AND  < m.txt

pesto12601
Posts: 20
Joined: 04 Mar 2012 20:56

Re: Find Files: How to search only a range of filenames?

Post by pesto12601 »

Yes... 2 spaces before the "And" and 2 spaces after... still only seems to search the 6 files listed instead of the 50 in the folder within that range... strange!

I'm open to other ideas as well (scripts perhaps?)

serendipity
Posts: 3358
Joined: 07 May 2007 18:14
Location: NJ/NY

Re: Find Files: How to search only a range of filenames?

Post by serendipity »

pesto12601 wrote:Yes... 2 spaces before the "And" and 2 spaces after... still only seems to search the 6 files listed instead of the 50 in the folder within that range... strange!

I'm open to other ideas as well (scripts perhaps?)
I just tried with the same method on dummy text files and it works fine here. Are you sure all the htm files have the word "the" in them?

pesto12601
Posts: 20
Joined: 04 Mar 2012 20:56

Re: Find Files: How to search only a range of filenames?

Post by pesto12601 »

Strange.. perhaps it is because of the network drive I'm searching? Yes - all the files are very long and do have "the" in them (or at least 30 of the 50 do). Oh well... so long as I know that is the correct way to do the search, I will continue to play! Thx for checking in on a Sunday!

pesto12601
Posts: 20
Joined: 04 Mar 2012 20:56

Re: Find Files: How to search only a range of filenames?

Post by pesto12601 »

Ok.. I think I figured this out and perhaps it is considered a bug?

If I search from 9000.htm through 9999.htm... everything works ok.... but - if I search from 9000.htm through 10000.htm - it fails.

My guess is this has to do with how windows actually stores the files and filenames with 10000.htm falling in place BEFORE 9999.htm in the system - even though it has a higher number and the filename sort does show it re-sorted in the correct numerical order. I noticed that when I first open a tab with this network location, the filenames appear in the "system order"... 1.htm, 10.htm, 100.htm....10000.htm, etc... then the system resorts the order based on the Name column in the "correct" numerical order.

So... based on this, is there a way for the search to "resort" it search list before doing the search so filename searches like this will work 'logically'? Otherwise, the search option just will not work for me since most of my filenames go well beyond the 10000 threshold.

If I am incorrect and there is another way to do this... that would be great to know as well.

and of course... THANKS for your help!! :D

j_c_hallgren
XY Blog Master
Posts: 5824
Joined: 02 Jan 2006 19:34
Location: So. Chatham MA/Clearwater FL
Contact:

Re: Find Files: How to search only a range of filenames?

Post by j_c_hallgren »

The way files show in list for this type of name is based on Config>General>Natural sort order but this doesn't affect search compares (AFAIK) so maybe this needs to be investigated?
Still spending WAY TOO much time here! But it's such a pleasure helping XY be a treasure!
(XP on laptop with touchpad and thus NO mouse!) Using latest beta vers when possible.

pesto12601
Posts: 20
Joined: 04 Mar 2012 20:56

Re: Find Files: How to search only a range of filenames?

Post by pesto12601 »

Aha! Yes - I do have the General->Sorting->Natural numeric sort order checked... so, perhaps we can have this option reflected with the search function so if checked, the search will reflect that as well?

Thanks for the insight... getting closer to figuring this out!!

neutrox
Posts: 194
Joined: 05 Mar 2012 15:23

Re: Find Files: How to search only a range of filenames?

Post by neutrox »

i always find this a bit strange.

folder contains a range of files from 9000.htm to 10100.htm, a.txt to e.txt.

Code: Select all

: >= b AND  <= d
shows b.txt and c.txt
won't show d.txt, which is wrong.

Code: Select all

: >= b AND  < d
shows b.txt and c.txt
works as expected.

Code: Select all

: > d
shows d.txt and e.txt, which is wrong.
searching local folder, no content searched.

@pesto12601
please not that after AND you must have a double space.

neutrox
Posts: 194
Joined: 05 Mar 2012 15:23

Re: Find Files: How to search only a range of filenames?

Post by neutrox »

by the way: how do i limit comparison searches to a certain extension or set of extensions?

pesto12601
Posts: 20
Joined: 04 Mar 2012 20:56

Re: Find Files: How to search only a range of filenames?

Post by pesto12601 »

Thanks Neutrox - yes.. I do have all the spacing correct and it does work when the numerical order falls within the sort range (ie: 9000.txt thru 9020.txt). It doesn't work when searching through ranges that are outside the "system" sort range but within the 'natural numerical range' (ie: 9000.txt thru 10000.txt) because the system counts 10000.txt BEFORE 9000.txt...

My request would be for the search to look to the option parameter for the 'natural numeric sort' and use that "list" before doing the actual sort based on the system sort.... or just have an option within the search to check this on/off as an override option to the global parameter.

Thanks for your thoughts!!

neutrox
Posts: 194
Joined: 05 Mar 2012 15:23

Re: Find Files: How to search only a range of filenames?

Post by neutrox »

i see and that's why i pointed those examples.

they don't rely on 'numeric natural sort order' at all because well, they are letter-based :roll:

pesto12601
Posts: 20
Joined: 04 Mar 2012 20:56

Re: Find Files: How to search only a range of filenames?

Post by pesto12601 »

Yes.. I would think even letter based searches would work properly with the new methods... it would just do what it does now... hope this can get added to the next release cycle as I really would love to be able to search within the product instead of looking elsewhere for software that allows filename range restrictions (hard to find!).

pesto12601
Posts: 20
Joined: 04 Mar 2012 20:56

Re: Find Files: How to search only a range of filenames?

Post by pesto12601 »

Added this to the feature request cause I'm not sure this is really a bug or not... but figured I'd add there in case I'm just way off base on this request. Hopefully not.. :)

Post Reply