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?
Matching ?
Re: Matching ?
Set your source directory first (I guess that helps?).
C:\MYDIR
Then, namepartdupe:
So:
And of course you can filter from there, if you only want to see orange & green files:
C:\MYDIR namepartdupe: orange green
C:\MYDIR
Then, namepartdupe:
So:
Code: Select all
C:\MYDIR namepartdupe:
C:\MYDIR namepartdupe: orange green
Re: Matching ?
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.
Re: Matching ?
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
So nameduppart: will match all of the following:
In.mbx
In.mbx.001
In.mbx.002.TXT
Re: Matching ?
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.
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.
Re: Matching ?
Everything has a lot of power and possibilities. Try for example: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.
- Search for: (replace c:\test with the actual foldername)
"C:\test\" ext:raw;jpg
- 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
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?
Re: Matching ?
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.
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.
Re: Matching ?
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?
- Just remove jpg's in a folder or also in subfolders? : Also in subfolders
Still unanswered:
- Is it always the same (root) folder?