New user needs to find file matches over several folders, if any

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
micnolmad
Posts: 8
Joined: 09 Jul 2020 20:37

New user needs to find file matches over several folders, if any

Post by micnolmad »

Hi,

I'm new to xyplorer but not computing data.

I have three folders open. One with recovered data, two with regular files.
What I need is to easily search the two regular folders if a recovered files is in one or both of those. Since the recovered files are nameless I have to open each one and figure out what it is and rename it, so the filenames might not match 100%.

So first I thought about combining the two regular folders so the search would have a single folder as target but I can't figure out if this is possible.

Then I tried to select both tabs at the same time but that I can't figure out if is supported either.

So now I turn to you guys for help..

I would like to just be able to right-click or select a renamed file and have xyplorer search the two regular folders so I can act acordingly.

Thanks :)

/michael

highend
Posts: 13274
Joined: 06 Feb 2011 00:33

Re: New user needs to find file matches over several folders, if any

Post by highend »

You can combine folders into a search by putting both paths into the "Location:" string part (Name & Location tab) and separate them by e.g. a bar ("|") character
One of my scripts helped you out? Please donate via Paypal

micnolmad
Posts: 8
Joined: 09 Jul 2020 20:37

Re: New user needs to find file matches over several folders, if any

Post by micnolmad »

Awesome! Thank you for that!

Do you know if I can do anything to not have to type the filename into the search field?

highend
Posts: 13274
Joined: 06 Feb 2011 00:33

Re: New user needs to find file matches over several folders, if any

Post by highend »

Setup your search as you need it (including both folders)
Execute it now

Menu - Edit - Search Templates...

Click on "Save to Template..." (do NOT check the [ ] Save search results)
Name it "test"

Now every time you want to search again, execute this script (e.g. with a keyboard shortcut, from the catalog, ...) while you have selected a file in the list that you want to search for:

Code: Select all

    $searchTemplate = "<xydata>\FindTemplates\test.ini";
    setkey <curname>, "Named", "Named", $searchTemplate;
    loadsearch "test", "rl";
One of my scripts helped you out? Please donate via Paypal

micnolmad
Posts: 8
Joined: 09 Jul 2020 20:37

Re: New user needs to find file matches over several folders, if any

Post by micnolmad »

Hm I can't find the Scripting menu...

highend
Posts: 13274
Joined: 06 Feb 2011 00:33

Re: New user needs to find file matches over several folders, if any

Post by highend »

Free version of XYplorer?
One of my scripts helped you out? Please donate via Paypal

highend
Posts: 13274
Joined: 06 Feb 2011 00:33

Re: New user needs to find file matches over several folders, if any

Post by highend »

Apart from that I'd solve the problem in a different way by writing a small tool that scans
all files in all three folders (org1, org2 and reco(very) and calculates a xxH32 hash on all of them.
Afterwards it compares the hashes from the reco(very) folder files with those of org1 and org2
and finally exports a log that shows which file from reco exists in org1, org2 and in none of those two.

In other words, the last entries show the recovered files that don't exist in any original form...

Why xxH32? Because it's ultra fast so that even folders with thousands of files (or larger ones) can be processed quickly...

Sure, that requires programming skills but it probably saves dozen of hours if there are many files that need to be opened and compared manually...
One of my scripts helped you out? Please donate via Paypal

micnolmad
Posts: 8
Joined: 09 Jul 2020 20:37

Re: New user needs to find file matches over several folders, if any

Post by micnolmad »

highend wrote: 09 Jul 2020 20:53 You can combine folders into a search by putting both paths into the "Location:" string part (Name & Location tab) and separate them by e.g. a bar ("|") character
The combine character is ;

I still can't get the namebase part of the selected file into the Name field of the Name & Location tab in the Info panel. I was hoping I could use <curbase> but it doesn't work.

highend
Posts: 13274
Joined: 06 Feb 2011 00:33

Re: New user needs to find file matches over several folders, if any

Post by highend »

The combine character is ;
It's not very clever to use this instead of "|" because it can be part of a file name.
I still can't get the namebase part of the selected file into the Name field of the Name & Location tab in the Info panel
And it didn't came to your mind to use <curbase> instead of <curname> in viewtopic.php?p=179175#p179175
?
One of my scripts helped you out? Please donate via Paypal

micnolmad
Posts: 8
Joined: 09 Jul 2020 20:37

Re: New user needs to find file matches over several folders, if any

Post by micnolmad »

It doesn't matter what xy variable I use, I still get either zero results or all files. I have tried to load the clipboard with the filename and base only but nothing works.
Last edited by micnolmad on 31 Jul 2020 15:28, edited 2 times in total.

micnolmad
Posts: 8
Joined: 09 Jul 2020 20:37

Re: New user needs to find file matches over several folders, if any

Post by micnolmad »

highend wrote: 31 Jul 2020 15:04 It's not very clever to use this instead of "|" because it can be part of a file name.
This is what is in the help file, not something I decided.

highend
Posts: 13274
Joined: 06 Feb 2011 00:33

Re: New user needs to find file matches over several folders, if any

Post by highend »

??? Show the script you've used...
One of my scripts helped you out? Please donate via Paypal

micnolmad
Posts: 8
Joined: 09 Jul 2020 20:37

Re: New user needs to find file matches over several folders, if any

Post by micnolmad »

I am not using a script. Free version.

I am only using the GUI.

From help file:
Info Panel: Find Files Tab
Tab "Name & Location"

XYplorer native variables are resolved in the name pattern. So you can search for things like <U+202E> or <clipboard>.

highend
Posts: 13274
Joined: 06 Feb 2011 00:33

Re: New user needs to find file matches over several folders, if any

Post by highend »

If a basename is in the clipbard, and lets say it's "001" than it will find all items where "001" is part of the name (regardless where), if <clipboard> is used in the name field.
That works flawlessly even with the free version.
One of my scripts helped you out? Please donate via Paypal

micnolmad
Posts: 8
Joined: 09 Jul 2020 20:37

Re: New user needs to find file matches over several folders, if any

Post by micnolmad »

It returns no results every time in my tests where I know there should be a hit.
As I said before this is both in <curbase> and <clipboard>, no matter if I copy Name or Base to clipboard or have selected item be selected or not.

Even if I set location to the same folder as the file is in, I get no result.
Last edited by micnolmad on 31 Jul 2020 15:50, edited 1 time in total.

Post Reply