I need the ability to be able to find files sequentially. That is, not do a full blown search. The reason is, I am renaming files and I need to be able to compare similar files. When I do a search, I only see files that match that exact search but not related ones... and there is no way to do a complex search to capture both.
e.g.,
file.pdf
and
file_1.pdf
I need to compare all files that have _1 on the end. I view both pdf's and determine which one is better.
It is like searching for a word. I simply want the panel view to jump to the next file that matches _1 while still listing all files.
Easy Quick Search
-
highend
- Posts: 14956
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: Easy Quick Search
What?and there is no way to do a complex search to capture both.
Code: Select all
>^file(_1)?\.pdf
:"file.pdf" | "file_1.pdf"
One of my scripts helped you out? Please donate via Paypal
-
Stretto
- Posts: 108
- Joined: 30 Jan 2012 06:43
Re: Easy Quick Search
Nope, I SIMPLY want to be able to hit F3(or whatever trigger starts the process), type in a search type(regex, wildcards, whatever) and it TAKE me to the first match in the list, then be able to repeat the process without typing in the search term again(reused).
I.e., Exactly how it works in most programs that do searching. You put in your search term in it simply goes to the first one, it doesn't change ANYTHING else. You should learn to take things less literal. "e.g." means "An example". It is not mean that the answer is also an oversimplification.
Why? Because your "answer" does not work in general. You have to know the filename(or at least part of it that will produce a unique result) for it to work, which then makes it rather useless.
Instead of trying to find alternate solutions that actually don't fit my criteria<removed>, it would be nice to either show the way to do it in XYplorer or state that you don't know how to do it in XYplorer and that it might not be able to be done.
Since you seem to have difficulty following criteria, let me spell it out<removed>
1. Gather 100 files and put them in a random directory
2. Take about 20 of them and copy them to the same dir using "Copy with increment"<removed>
3. Now, You want to actually see each FILE with it's COPIED one in a nice convenient way so you can compare their contents(by double clicking on them, since they are pdfs in my case, this opens up the pdf viewer... they are the same, but that is irrelevant for this EXAMPLE). One or the other will be deleted depending on the contents.
With standard searching, you can search for the increment, but then you won't get the original, so you can't compare<removed>.
With your method, I'd have to know all the file names to be able to do it, which basically makes it useless in the first place. Now, if we could do a compound regex search using captures and such then it could be done, e.g., (.*)*_\d*.pdf | \1.pdf..<removed>
I.e., Exactly how it works in most programs that do searching. You put in your search term in it simply goes to the first one, it doesn't change ANYTHING else. You should learn to take things less literal. "e.g." means "An example". It is not mean that the answer is also an oversimplification.
Why? Because your "answer" does not work in general. You have to know the filename(or at least part of it that will produce a unique result) for it to work, which then makes it rather useless.
Instead of trying to find alternate solutions that actually don't fit my criteria<removed>, it would be nice to either show the way to do it in XYplorer or state that you don't know how to do it in XYplorer and that it might not be able to be done.
Since you seem to have difficulty following criteria, let me spell it out<removed>
1. Gather 100 files and put them in a random directory
2. Take about 20 of them and copy them to the same dir using "Copy with increment"<removed>
3. Now, You want to actually see each FILE with it's COPIED one in a nice convenient way so you can compare their contents(by double clicking on them, since they are pdfs in my case, this opens up the pdf viewer... they are the same, but that is irrelevant for this EXAMPLE). One or the other will be deleted depending on the contents.
With standard searching, you can search for the increment, but then you won't get the original, so you can't compare<removed>.
With your method, I'd have to know all the file names to be able to do it, which basically makes it useless in the first place. Now, if we could do a compound regex search using captures and such then it could be done, e.g., (.*)*_\d*.pdf | \1.pdf..<removed>
-
Stretto
- Posts: 108
- Joined: 30 Jan 2012 06:43
Re: Easy Quick Search
I've come up with a simple hot-key assignable script which works, although some parameters are hard coded due to the weird nature of xy scripting(or lack of features).
global $count; global $index; global $list; perm $index = -1; perm $list = quicksearch("_1.pdf", , , "s"); perm $count = gettoken($list, "count", chr(13));
if ($index > $count) { $index = 1 } else { $index = $index + 1; }; goto trim(gettoken($list, $index, chr(13)), chr(13).chr(10)." ");
The first line sets up the search and finds the results and the second line steps through. Just need to assign a hot key to the second line, of course, I can't see how to do that, but I'm sure it's somewhere in there.
global $count; global $index; global $list; perm $index = -1; perm $list = quicksearch("_1.pdf", , , "s"); perm $count = gettoken($list, "count", chr(13));
if ($index > $count) { $index = 1 } else { $index = $index + 1; }; goto trim(gettoken($list, $index, chr(13)), chr(13).chr(10)." ");
The first line sets up the search and finds the results and the second line steps through. Just need to assign a hot key to the second line, of course, I can't see how to do that, but I'm sure it's somewhere in there.
-
highend
- Posts: 14956
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: Easy Quick Search
This is by the way the first and only warning:
Should any of your posts ever contain stuff again (that I've replaced with a <removed> in your second post)...
Consider your account banned permanently
Assign shortcuts by using script labels (Find, Find next)
Thread locked
Should any of your posts ever contain stuff again (that I've replaced with a <removed> in your second post)...
Consider your account banned permanently
Assign shortcuts by using script labels (Find, Find next)
Code: Select all
"Find"
$search = input("Search term to find affixed files", , "_1.pdf");
if (!$search) { status "No search term entered, aborted!", , "alert"; end true; }
perm $P_SearchResults = quicksearch($search, , , "s");
if (!$P_SearchResults) { status "No result(s), aborted!", , "alert"; end true; }
perm $P_SearchResultsCount = gettoken($P_SearchResults, "count", <crlf>);
perm $P_SearchResultsIndex = 1;
goto gettoken($P_SearchResults, 1, <crlf>);
"Find next"
perm $P_SearchResults; perm $P_SearchResultsCount; perm $P_SearchResultsIndex;
$P_SearchResultsIndex++;
if ($P_SearchResultsIndex > $P_SearchResultsCount) { $P_SearchResultsIndex = 1; }
goto gettoken($P_SearchResults, $P_SearchResultsIndex, <crlf>);
One of my scripts helped you out? Please donate via Paypal
XYplorer Beta Club