Suggestion: Search similar files from selection

Ideas for improvements and requests for new features in XnView MP

Moderators: helmut, XnTriq, xnview

Post Reply
User avatar
orbspider
Posts: 170
Joined: Tue May 22, 2012 5:42 pm
Location: Malayan jungle
Contact:

Suggestion: Search similar files from selection

Post by orbspider »

At the moment, I can't figure out how to search for similar files from the selected files

It would be very helpful if
  • 1. I can select files e.g. favorites that I want to print
    2. I can search for files with same name in my Originals backup on another directory
    3. files are found and I can copy them to a new folder!
I can work around this by copying/moving selected files to a new folder and then run the search between this new folder and backup location,
And then I need to click on the copyto button for every file to extract all the needed Originals to a new folder ready for printing :?
User avatar
orbspider
Posts: 170
Joined: Tue May 22, 2012 5:42 pm
Location: Malayan jungle
Contact:

Re: Suggestion: Search similar files from selection

Post by orbspider »

Here's the method that saved my butt yesterday, when my colleague needed about two or three thousand of my original pics, and they were all nestled in my backup disk...

Well I got them all for him in about an hour or less.

1. Did Category filter
2. Select all
3. Edit menu > Copy to clipboard > selected filenames
4. Pasted file names into a file called "copylist"
5. Ran a script called "findcopypics"
6. Moved the found originals to another location
7. Repeat 1.-6.

want to know what the script looks like?
like this

Code: Select all

#!/bin/bash

dir=/media/625GB/z\ photo\ backup/                        #location of originals to search in
dest=/media/FILES/PRINT/FIND/                             #location to send found originals
toCopyList=/media/FILES/my\ pictures/copylist             #location of file with file names to search for
notCopied=/media/FILES/my\ pictures/missed                #location of file to dump file names of file not found from search

while read line; do
   find "$dir" -name "$line" -exec cp '{}' $dest \; -printf "%f\n"    
done < "$toCopyList" > cpList

 cat cpList "$toCopyList" | sort | uniq -c | sed -nr '/^ +1/s/^ +1 +(.*)/\1/p' \
    > "$notCopied"
it will even report on files that were not copied (or not found).
it could be better, I had help with this from stack exchange, but it works.
Last edited by orbspider on Sat Jun 22, 2013 3:23 pm, edited 1 time in total.
User avatar
oops66
XnThusiast
Posts: 2005
Joined: Tue Jul 17, 2007 1:17 am
Location: France

Re: Suggestion: Search similar files from selection

Post by oops66 »

Hello,

Maybe it will be interesting to have the result of the search saved into DB, a category " - Similar" ... so:

Code: Select all

- Special items
           - Tag(n)
           - Uncategorized
           - All
           + Similar(n Items) (at mini. similarity = x)
                  - Item 1(n)
                  - Item 2(n)            
                  - ...
                  - Item n(n)
XnViewMP Linux X64 - Debian - X64
User avatar
oops66
XnThusiast
Posts: 2005
Joined: Tue Jul 17, 2007 1:17 am
Location: France

Re: Suggestion: Search similar files from selection

Post by oops66 »

orbspider wrote:At the moment, I can't figure out how to search for similar files from the selected files ?
Hello, usually the best way to do that is to: tag them all before, then selects them (into -Special items\- Tag(n)), then find similar search tool (or copy/paste or else).

...But your are right, this way does not work with the similar search tool ... probably a bug ?
XnViewMP Linux X64 - Debian - X64
Post Reply