Delete jpg and raw files simultaneously on Windows

This post is for Windows. A solution for Ubuntu could be Geeqie. [1]

I use my camera with the mode to save jpeg+raw. If I want to get skim through the pictures I always had twice the work (show jpg, skip raw)  and sorting out (delete jpg and delete raw). IrfanView at least allows to skip the raw image with the keyboard shortcut <Ctrl>+2. [2] Although the deletion process stays burdensome.

A much easier way on Windows for viewing JPG and then deleting JPG+RAW files simultaneously is to use XnView. After installing do the following:

  1. Open the XnView-config file: %appdata%\XnView\xnview.ini (in my case C:\Users\alex\AppData\Roaming\XnView\xnview.ini).
  2. In the section [File] add a new line at the end: Companion_00=jpg:cr2
    This links the .cr2 (raw-File) to the .jpg. So if you delete the jpg it automatically deletes the .cr2. Replace the cr2 with the extension of your raw-file (so eg nef for Nikon) and save the file.
    If you want the effect also in the other direction you have to create another newline:  Companion_01=cr2:jpg. For now you can just leave this, as we will hide the raw files in the next steps.
  3. Start XnView and open the options (Menu: Tools > Options or via <F12>) and see also screenshots below.
    1. In General open the tab File Operations tick the checkbox “For Copy/Move/Delete use companion file (.xmp/.thm/.jpg)
    2. In Browser > File List write the file extension you want to hide (the raw file: in my case cr2) in the last text input and click the OK button.

That is it. Now it should be easier to sort your pictures, as only the jpg-pictures are shown and if you delete it, the raw file automatically gets also deleted.


xnview-configfile xnview-general xnview-filelist



%d bloggers like this: