Easy find files function.

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
I.R.Brainiac
Posts: 32
Joined: 08 Nov 2022 22:56

Easy find files function.

Post by I.R.Brainiac »

Hello,still new here...

I would like a way to find all files that are related to a raw file.(fuji .raf files)
I can run a search by left click,right click,copy,paste into search field.Results would be all files created by camera and editing programs.Fine so far.

What would be great would be a simpler way to either immediately populate the search field upon second select (as though you were renaming the file),or,
Have a live view tab in the second pane that auto displays results of a search just by selecting the first file.(the original .raf from the camera)

Is this possible? Custom button toggle? Script(I know nothing about scripting but could learn)?

The reason for this is when using several image editors they all spew files all over the place and then dont clean up after themselves.The one common attribute across these files is the original name the camera gave the raf and jpg.

Instant search would make it easier to keep house.
Thanks from Michael.

I.R.Brainiac
Posts: 32
Joined: 08 Nov 2022 22:56

Re: Easy find files function.

Post by I.R.Brainiac »

On a related note...how to change the find files header color from light blue to something darker?
Minor quibble I know.
I am using a custom theme on win11 for dark mode and then changing any needed colors in XY (text,tabs,etc...)(so not using actual dark mode in XY)

thanks

I.R.Brainiac
Posts: 32
Joined: 08 Nov 2022 22:56

Re: Easy find files function.

Post by I.R.Brainiac »

hmmmm...I can make a find now button...just need to figure out how to get the results in the opposite pane.having the opposite pane be a live results view would be even better.
The configurability of XY is amazing. :party:

highend
Posts: 14956
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Easy find files function.

Post by highend »

Write a script, put it on a button.

Get the base name of the current selected file, use quicksearch() to get results, switch focus to the second pane, load the results into a paperfolder...
One of my scripts helped you out? Please donate via Paypal

I.R.Brainiac
Posts: 32
Joined: 08 Nov 2022 22:56

Re: Easy find files function.

Post by I.R.Brainiac »

That sounds perfect...now I just have to make it work.
My script right now just drops a menu down so its time to go read up on creating scripts.

thank you

highend
Posts: 14956
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Easy find files function.

Post by highend »

Code: Select all

    $base = gpc(<curitem>, "base");
    end (!$base), "No item selected, aborted!";
    $matches = quicksearch($base . "* /f", <curpath>, , "s");
    end (!$matches), "No matches found!";
    focus "PI";
    paperfolder("Search results", $matches);
One of my scripts helped you out? Please donate via Paypal

I.R.Brainiac
Posts: 32
Joined: 08 Nov 2022 22:56

Re: Easy find files function.

Post by I.R.Brainiac »

That almost worked perfectly...and I would never have been able to figure that out.(I am an artist,not a programmer) :tup:
It only returned the original file as a result but I think that is because it only searched the current loacation.

How do I broaden the search to a specific location? say my Image files (D:\Images\Fuji X-T3\)

I tried to insert that into the script but it returned location unavailable.

I really need to learn how scripting works.I had a button working to give the results I wanted in a search tab but I must have broke something because it stopped working.

Thank you very much. Now that I see there IS a way to do this,its just a matter of getting the right commands I guess.

highend
Posts: 14956
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Easy find files function.

Post by highend »

Replace <curpath> with "D:\Images\Fuji X-T3"?
One of my scripts helped you out? Please donate via Paypal

I.R.Brainiac
Posts: 32
Joined: 08 Nov 2022 22:56

Re: Easy find files function.

Post by I.R.Brainiac »

That errors with dubious syntax.
I am appreciating the help.

I should be able to do this but I have a headache and its not helping.
Shouldnt this be possible with XYs numbered commands? I tried a multiline button but it just drops a menu down with options for each command. It dosnt run them as a group.

highend
Posts: 14956
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Easy find files function.

Post by highend »

That errors with dubious syntax.
Then show a screenshot of that one^^
Shouldnt this be possible with XYs numbered commands?
No
it just drops a menu down with options for each command. It dosnt run them as a group.
Sorry but is this a guessing game?
One of my scripts helped you out? Please donate via Paypal

I.R.Brainiac
Posts: 32
Joined: 08 Nov 2022 22:56

Re: Easy find files function.

Post by I.R.Brainiac »

Guessing game? Do you mean I wasnt clear? If so I apologize.

I made a custom button and in edit I added 2 XYs numbered commands.Copy base name and Find now.
When I clicked on the button it drops a menu with the two commands. I thought they would run sequentially.

Here is a screenshot of dubious syntax. I tried multiple variations of how I typed the location for the search.
All either returned dubious syntax or location unavailable.(because I dont know what I am doing)

I am reading about scripts but it is all new to me.

thank you.
To see the attached files, you need to log into the forum.

klownboy
Posts: 4462
Joined: 28 Feb 2012 19:27
Location: Windows 11, 25H2 Build 26200.8737 at 100% 2560x1440

Re: Easy find files function.

Post by klownboy »

It's hard to read your screenshots, but do you have the folder quoted as in highend's post? It doesn't look like it. And, why aren't you using highend's script as provided (other than the folder name). The script obtains the base filename and searches (i.e., make a CTB that simply loads his script).

I.R.Brainiac
Posts: 32
Joined: 08 Nov 2022 22:56

Re: Easy find files function.

Post by I.R.Brainiac »

Howdy klownboy.
Yep! That fixed it.! :party: (I didnt understand the need for the quotes) Headache fading. ;)

If I delete a raf or jpg the usual way,all the related files get orphaned. This is the only way I know to be sure I keep a clean sytem by showing me every file that has the letters DSCFxxxx. That could be .dop,.raf.jpg,.tif,.cop,cot,.cof etc...
All these extra files grow quickly outf hand if not hunted down and deleted.A single .raf might have 10 or more related files.
One of my pet peeves is programs that spew unneeded files. Capture one creates 3 different files for each image file. Even if you are not letting it view or edit some formats.
Its maddening. :?
Thanks!!!
Last edited by I.R.Brainiac on 10 Nov 2022 04:20, edited 2 times in total.

I.R.Brainiac
Posts: 32
Joined: 08 Nov 2022 22:56

Re: Easy find files function.

Post by I.R.Brainiac »

I have begun reading about scripting but I am in over my head real quick. :eh:

Post Reply