Page 1 of 1
Find Files: How to search only a range of filenames?
Posted: 09 Sep 2012 18:15
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!
Re: Find Files: How to search only a range of filenames?
Posted: 09 Sep 2012 18:51
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
Re: Find Files: How to search only a range of filenames?
Posted: 09 Sep 2012 18:55
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?)
Re: Find Files: How to search only a range of filenames?
Posted: 09 Sep 2012 18:57
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?
Re: Find Files: How to search only a range of filenames?
Posted: 09 Sep 2012 19:19
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!
Re: Find Files: How to search only a range of filenames?
Posted: 29 Sep 2012 16:19
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!!

Re: Find Files: How to search only a range of filenames?
Posted: 29 Sep 2012 16:51
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?
Re: Find Files: How to search only a range of filenames?
Posted: 29 Sep 2012 16:56
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!!
Re: Find Files: How to search only a range of filenames?
Posted: 29 Sep 2012 17:03
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.
Re: Find Files: How to search only a range of filenames?
Posted: 29 Sep 2012 17:08
by neutrox
by the way: how do i limit comparison searches to a certain extension or set of extensions?
Re: Find Files: How to search only a range of filenames?
Posted: 29 Sep 2012 17:11
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!!
Re: Find Files: How to search only a range of filenames?
Posted: 29 Sep 2012 17:44
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

Re: Find Files: How to search only a range of filenames?
Posted: 29 Sep 2012 18:13
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!).
Re: Find Files: How to search only a range of filenames?
Posted: 30 Sep 2012 00:52
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..
