Camera RAW / jpg filter

Hi all,

I've been shooting in raw + jpeg format for years. I need to revive space, so I'm planing to delete all jpeg files where the nef (nikon raw file) exists in same folder .

Scenario.
in folder images
dsc_3130.jpg
dsc_3130.nef
dsc_3131.jpg
dsc_3132.jpg
dsc_3132.nef

in this scenario i will delete dsc_3130.jpg and dsc_3132.jpg since these files have corresponding nef file in same folder. File dsc_3131.jpg does not have corresponding nef filse so cannot be deleted.

Can I use Opus for this purpose?
All input welcome!

Thanks

Do you need this for files in the current folder, or do you want to be able to recursively select/delete files in and below the current folder?

You need to somehow find and select duplicate filenames (not files). This can be done using Rename.

It is good to first isolate the files you want to work with (using a Collection for example). If you need more details on this, let me know.

  1. Clear the Undo history (very important step).
    Tools > Output Window > Undo tab
    press the Clear button

  2. Select all the JPG and NEF files (or only NEF files),
    Remove extensions from NEF files using Rename:
    Use Find and Replace Type
    Check Include File extension
    Old name: .nef
    New name: (leave empty)

  3. Select all the JPG files (or all the JPG files and files without extension),
    Remove extensions from JPG files using Rename:
    Use Find and Replace Type
    Check Include File extension
    Old name: .jpg
    New name: (leave empty)

  4. An error warning will appear, click Skip All

  5. The JPG files you want to delete (those, that also exist in the NEF format) are now selected. They coudn't be renamed because these filenames are duplicate. Opus selected them instead.

  6. Delete the selected files.

  7. Go to Tools > Output Window > Undo tab, select all the Rename actions (Do not select the items which have Delete under Action column) and click Undo (be careful, do not hit Undo All by mistake)

  8. This will return the proper extensions to the remaining files (it will rename them back).

This method works for files in one folder or for files residing in various folders within hierarchy (you just need to move all the JPG and NEF files to a Collection using a Flat view and simple Select filter first and work with the Collection - just one example).

I attached some pictures. If you want I can post more detailed tutorial. Just let me know. Maybe Leo will come up with better/simpler solution than this.
Backup your files before you try it (if you do backups). Or test it on some testing files/testing hierarchy first.

This worked for me, however I provide no warranty :slight_smile:.
DirOpus-NEF_and_JPG_duplicate_filenames.zip (156 KB)

LEO: I'll be running this on single folder at a time.

RAPTOR|3d Thanks alot for your feedback.
This was more steps and a little more complicated than I had hoped for, but i gets the job done.

If it's just one folder at a time then this should do the trick:

Select *.nef DESELECTNOMATCH Select {file$|ext=.jpg} Select *.nef DESELECT Delete

Might be worth leaving out the Delete at the end initially, to test that it selects the appropriate files and I haven't messed up, but it looks good on my test dir.

Leo,
Thanks for your suggestion, but unfortunatly I am to much of a Opus Nnewbie to utilize this. I dont know where and how to run this code.
Thanks anyway :slight_smile:

Regards

Ari

There's a video on button editing that should get you up to speed. It's in the tutorials section here.

Thanks!
I was struggeling with how to edit the buttons, kept missing the fact i had to click customize first !

I was able to get this to work!
I have decided i want to copy the files to a subdirectory called jpg and the delete manually after check!

Thanks for your help!

Regards

Ari

To do that, change the last line so the command is like this:

Select *.nef DESELECTNOMATCH Select {file$|ext=.jpg} Select *.nef DESELECT Copy MOVE HERE CREATEFOLDER="JPEGs"
(That'll move them into a folder called JPEGs.)