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!
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.
Clear the Undo history (very important step). Tools > Output Window > Undo tab
press the Clear button
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)
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)
An error warning will appear, click Skip All
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.
Delete the selected files.
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)
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.
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
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.)