Page 1 of 2

How to prevent "Find Files" from doing new search from scratch on switching back to search tab?

Posted: 30 Oct 2020 17:58
by amirvf
I have lots of files in network and many times I need to search for some particular items and it usually takes 1-2 minutes to finish the search.
Then I need to keep the searched results tab intact and select another tab to look into some other files.
The issue is that when I switch back to my search tab, it automatically starts a new search from scratch!!!

If the search is on a local drive, and among few folders, especially when using cached search, it won't be a big deal. But when it is in a network drive, it will be a big trouble.
Every time you want to switch back to your search tab, you should wait few minutes!!!

How could I disable auto search when I switch back to the search tab?

Re: How to prevent "Find Files" from doing new search from scratch on switching back to search tab?

Posted: 30 Oct 2020 18:08
by highend
Afaik, you can't.

Storing your search in a paperfolder seems to be the only solution atm.

Try this script to do that...
Convert pane to paperfolder.xys

Re: How to prevent "Find Files" from doing new search from scratch on switching back to search tab?

Posted: 30 Oct 2020 18:45
by amirvf
highend wrote: ↑30 Oct 2020 18:08 Afaik, you can't.

Storing your search in a paperfolder seems to be the only solution atm.

Try this script to do that...
Convert pane to paperfolder.xys
Thanks for the script. But another issue just popped up! As soon as I switch back to Paper Folder Tab it automatically refreshes all columns from scratch (Although Auto Refresh is turned off). Again I should wait for few minutes before all columns refresh! I have columns including special properties for video files which takes a long time to load (especially from a network folder).

Any idea on how to disable auto refresh when switching back to Paper Folder Tab?

Re: How to prevent "Find Files" from doing new search from scratch on switching back to search tab?

Posted: 30 Oct 2020 18:50
by highend
After executing the script you should close the search tab, otherwise you'll have the same problem as before

Re: How to prevent "Find Files" from doing new search from scratch on switching back to search tab?

Posted: 30 Oct 2020 18:55
by amirvf
highend wrote: ↑30 Oct 2020 18:50 After executing the script you should close the search tab, otherwise you'll have the same problem as before
After executing the script, the search tab is not open anymore. It will convert to paper folder. The issue is due to auto refreshing columns on switching to paper folder.

Re: How to prevent "Find Files" from doing new search from scratch on switching back to search tab?

Posted: 30 Oct 2020 19:09
by highend
I don't think that you can disable that behavior. I would try to tweak your custom columns in that case or remove all columns that aren't absolutely necessary when viewing that paperfolder...

Re: How to prevent "Find Files" from doing new search from scratch on switching back to search tab?

Posted: 30 Oct 2020 19:24
by amirvf
highend wrote: ↑30 Oct 2020 19:09 I don't think that you can disable that behavior. I would try to tweak your custom columns in that case or remove all columns that aren't absolutely necessary when viewing that paperfolder...
I have a custom column layout for my video files and the main idea behind my search is to search for video files in different folders, and then look at the columns for detailed info. Columns are defined by scripts which fetch information from "MediaInfo". The following column is an example which shows audio bitrate of a video file:

Code: Select all

$mediaInfo = "C:\Program Files\MediaInfo_CLI_20.09_Windows_x64\MediaInfo.exe";
return regexreplace(runret("$mediaInfo --Inform=Audio;%BitRate/String%- ""<cc_item>"""), "\r?\n");
I wish I could find a solution, because it makes XYplorer very handy, especially when working with media files.

Re: How to prevent "Find Files" from doing new search from scratch on switching back to search tab?

Posted: 30 Oct 2020 19:37
by highend
Bitrate is something that exists as a normal property, you shouldn't need mediainfo to read that -> huge timesaver. You should really check your ccs if that info is already available via normal properties. But the best (and by far) the fastest way would be to tag your files with the necessary info and then only read these properties from the tag database instead of getting them on the fly via property() or mediainfo...

Re: How to prevent "Find Files" from doing new search from scratch on switching back to search tab?

Posted: 30 Oct 2020 20:23
by amirvf
highend wrote: ↑30 Oct 2020 19:37 Bitrate is something that exists as a normal property, you shouldn't need mediainfo to read that -> huge timesaver. You should really check your ccs if that info is already available via normal properties. But the best (and by far) the fastest way would be to tag your files with the necessary info and then only read these properties from the tag database instead of getting them on the fly via property() or mediainfo...
I have tried all normal properties. For this example, normal audio bitrate does not work for multiple audio streams in video files. I have made my columns as efficient as possible and with this trick XYplorer saves a huge amount of time (compared to any other metadata app in the market) to analyze and compare detailed video properties all at once. The only problem is the Auto Refresh / Auto Search issue which could not be disabled by any means.

Re: How to prevent "Find Files" from doing new search from scratch on switching back to search tab?

Posted: 30 Oct 2020 20:25
by amirvf
highend wrote: ↑30 Oct 2020 19:37 Bitrate is something that exists as a normal property, you shouldn't need mediainfo to read that -> huge timesaver. You should really check your ccs if that info is already available via normal properties. But the best (and by far) the fastest way would be to tag your files with the necessary info and then only read these properties from the tag database instead of getting them on the fly via property() or mediainfo...
I have not tried tagging so far. I'll give it a try to see if it is possible to tag all these information or not.

Re: How to prevent "Find Files" from doing new search from scratch on switching back to search tab?

Posted: 30 Oct 2020 20:49
by highend
Sure it's possible. It's only a question of organization. Either use the 16 extra columns or a schema like:
<info 1>#::#<info 2>#::#...#::#<info x>#::# for the tags field. This would allow to store any amount of info in the tags db and still the usage of normal information (which should be separated by a different one than "#::#" of course.
Then any custom column would just get the information by using something like this:
return gettoken(tagitems("tags",, <cc_item>), <x>, "#::#");
Where <x> is just 1, 2, ..., x - The position of where you stored the belonging data...

Re: How to prevent "Find Files" from doing new search from scratch on switching back to search tab?

Posted: 01 Nov 2020 17:35
by amirvf
highend wrote: ↑30 Oct 2020 20:49 Sure it's possible. It's only a question of organization. Either use the 16 extra columns or a schema like:
<info 1>#::#<info 2>#::#...#::#<info x>#::# for the tags field. This would allow to store any amount of info in the tags db and still the usage of normal information (which should be separated by a different one than "#::#" of course.
Then any custom column would just get the information by using something like this:
return gettoken(tagitems("tags",, <cc_item>), <x>, "#::#");
Where <x> is just 1, 2, ..., x - The position of where you stored the belonging data...
I tried to include some MediaInfo parameters as tags according to what you suggested but I was not successful.

Could you please give an example on how to fetch "Audio Bitrate" info from MediaInfo and include it in the tags? As I mentioned before, I used the following code to retrieve the information and include it in the column:

Code: Select all

$mediaInfo = "C:\Program Files\MediaInfo_CLI_20.09_Windows_x64\MediaInfo.exe";
return regexreplace(runret("$mediaInfo --Inform=Audio;%BitRate/String%- ""<cc_item>"""), "\r?\n");

Re: How to prevent "Find Files" from doing new search from scratch on switching back to search tab?

Posted: 01 Nov 2020 18:12
by highend
Em no. You shouldn't do tagging from a custom column script (although that's possible).

You use a normal script that reads in all files with a (user configurable) list of extensions recursively with the current folder as it's root.

That script does the tagging and your custom columns only get the necessary data from the tags database afterwards.

Read the comments in the script carefully and decide which way you want to go, the "get tags by index" or by "defined names" and depending on which you want you need to comment in / out the necessary part and adapt your custom column scripts.
Search for and tag video files [custom columns]_v0.1.xys

Re: How to prevent "Find Files" from doing new search from scratch on switching back to search tab?

Posted: 03 Nov 2020 10:18
by amirvf
highend wrote: ↑01 Nov 2020 18:12 Em no. You shouldn't do tagging from a custom column script (although that's possible).

You use a normal script that reads in all files with a (user configurable) list of extensions recursively with the current folder as it's root.

That script does the tagging and your custom columns only get the necessary data from the tags database afterwards.

Read the comments in the script carefully and decide which way you want to go, the "get tags by index" or by "defined names" and depending on which you want you need to comment in / out the necessary part and adapt your custom column scripts.

Search for and tag video files [custom columns]_v0.1.xys
Your suggestion to use tags is quite awesome and I have been working on it for the last 2 days to improve this valuable script.

One of the main issues is the presence of some characters in "MediaInfo values" which are not allowed in "XYlorer tags". One of them is the presence of quotation mark (") in values, which results in the failure of tagging for the whole values (not only the value which contains the disallowed character), in the file being processed.

Re: How to prevent "Find Files" from doing new search from scratch on switching back to search tab?

Posted: 03 Nov 2020 10:45
by highend
I've added a new topic for this script here:
viewtopic.php?f=7&t=22304

It has the ability to replace characters/strings before the tag happens as well.
The default is: replace double quotes with single quotes
but it allows to add additional replacements...

So if there are other chars that pose problems when tagging, mention them^^