Matching ?

General discussion related to "Everything".
Post Reply
varioflux
Posts: 3
Joined: Fri Jul 24, 2015 1:46 pm

Matching ?

Post by varioflux » Thu Jul 25, 2019 9:44 am

I'm looking for how to select, in a specific directory, all files that have the same name but with another extension. In practice all the "raw" files that have a match "jpg" in the same directory precisely, in order to erase them ... If the search / formulation know how to search also in the sub-directories it is even better!

I can not seem to find out how to formulate the search on the software, but I imagine that with regular expressions it must be feasible ... Can someone help me?

therube
Posts: 2309
Joined: Thu Sep 03, 2009 6:48 pm

Re: Matching ?

Post by therube » Thu Jul 25, 2019 3:29 pm

Set your source directory first (I guess that helps?).

C:\MYDIR

Then, namepartdupe:

So:

Code: Select all

C:\MYDIR  namepartdupe:
And of course you can filter from there, if you only want to see orange & green files:

C:\MYDIR namepartdupe: orange green

void
Site Admin
Posts: 4847
Joined: Fri Oct 16, 2009 11:31 pm

Re: Matching ?

Post by void » Fri Jul 26, 2019 2:26 pm

To limit the namepartdupe: search you'll first need to search for the folder in question, save as a file list, open that file list, then use the namepartdupe: search:
  • Search for:
    "C:\MYDIR\"
  • From the File menu, click Export...
  • Change Save As Type to EFU Everything File List (*.efu).
  • Choose a filename and click Save.
  • From the File menu, click Open File List...
  • Select your file list from above and click Open.
  • Search for:
    namepartdupe:
  • When you are finished with the results, close your filelist:
  • From the File menu, click Close File List.

therube
Posts: 2309
Joined: Thu Sep 03, 2009 6:48 pm

Re: Matching ?

Post by therube » Fri Jul 26, 2019 3:17 pm

Note that a file extension is considered everything after the first (dot).

So nameduppart: will match all of the following:

In.mbx
In.mbx.001
In.mbx.002.TXT

varioflux
Posts: 3
Joined: Fri Jul 24, 2015 1:46 pm

Re: Matching ?

Post by varioflux » Sun Jul 28, 2019 9:15 am

I can not express myself, but I go through google translation ... I explain the context:

I am a photographer and every time I take a picture my camera records 2 files, a "jpg" version (15 MB) and a "raw" version which is a raw file of 50 MB. The jpg version serves me only rarely but it is available immediately while the raw file needs to be revamped by Lightroom to make a new image, but it will be classified elsewhere than in the original directory. In general, once past the period of use of a photo session the jpg are no longer useful but clutter very quickly the hard drive.

I would like to find a solution to select in a single command and for a given directory (or a directory tree) all files "jpg" which have their equivalent "raw" in the same directory, so for example for the directory " test "(and subdirectories) all files" xxx0123.jpg "that have an equivalent" xxx0123.raw "in order to delete" jpg "versions. I'm not sure that everything is the right tool to make this selection.

NotNull
Posts: 1395
Joined: Wed May 24, 2017 9:22 pm

Re: Matching ?

Post by NotNull » Sun Jul 28, 2019 11:50 am

varioflux wrote:
Sun Jul 28, 2019 9:15 am
I would like to find a solution to select in a single command and for a given directory (or a directory tree) all files "jpg" which have their equivalent "raw" in the same directory, so for example for the directory " test "(and subdirectories) all files" xxx0123.jpg "that have an equivalent" xxx0123.raw "in order to delete" jpg "versions. I'm not sure that everything is the right tool to make this selection.
Everything has a lot of power and possibilities. Try for example:
  • Search for:
    "C:\test\" ext:raw;jpg
    (replace c:\test with the actual foldername)
  • From the File menu, click Export...
  • Change Save As Type to EFU Everything File List (*.efu).
  • Choose a filename and click Save.
  • From the File menu, click Open File List...
  • Select your file list from above and click Open.
  • Search for:
    namepartdupe: ext:jpg
This will report all .jpg files that have a matching .raw file

When you are finished with the results, close your filelist:
  • From the File menu, click Close File List.

But wait ... THERE's MORE!
This can indeed be done with one simple line of code (tested).
But code doesn't like ambiguity. It can't decide if it should only look in the current folder or also in subdirectories ("the tree"). So, to automate it:

- Just remove jpg's in a folder or also in subfolders?
- Is it always the same folder?

varioflux
Posts: 3
Joined: Fri Jul 24, 2015 1:46 pm

Re: Matching ?

Post by varioflux » Sun Jul 28, 2019 1:12 pm

No "jpg" should be deleted if there is not a "raw" strictly in the same directory and strictly the same name.
The only difference must be the extension (and "best" in practice the same date of creation but not necessarily the same time!) ...

It is necessary to search in a tree of files of the pairs of files "jpg" and "raw" stored in the same directory and to propose the "jpg" in the list.

NotNull
Posts: 1395
Joined: Wed May 24, 2017 9:22 pm

Re: Matching ?

Post by NotNull » Sun Jul 28, 2019 1:45 pm

OK, that answers the first question:
- Just remove jpg's in a folder or also in subfolders? : Also in subfolders

Still unanswered:
- Is it always the same (root) folder?

Post Reply