Page 1 of 2

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

Posted: 09 Jul 2020 20:47
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

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

Posted: 09 Jul 2020 20:53
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

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

Posted: 09 Jul 2020 20:55
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?

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

Posted: 09 Jul 2020 21:08
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";

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

Posted: 09 Jul 2020 21:56
by micnolmad
Hm I can't find the Scripting menu...

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

Posted: 09 Jul 2020 22:00
by highend
Free version of XYplorer?

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

Posted: 10 Jul 2020 01:17
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...

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

Posted: 31 Jul 2020 14:53
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.

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

Posted: 31 Jul 2020 15:04
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
?

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

Posted: 31 Jul 2020 15:22
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.

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

Posted: 31 Jul 2020 15:23
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.

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

Posted: 31 Jul 2020 15:24
by highend
??? Show the script you've used...

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

Posted: 31 Jul 2020 15:26
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>.

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

Posted: 31 Jul 2020 15:35
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.

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

Posted: 31 Jul 2020 15:43
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.