Deleting orphaned raw files

Started 3 months ago | Questions
gscotten
gscotten Senior Member • Posts: 1,658
Re: Deleting orphaned raw files
3

onlyfreeman wrote:

woodturner wrote:

I have found a batch file someone wrote that deletes all the unwanted RAWs at one go and is very fast. Couple of seconds. But it is kinda scary as it just does it, you can't see beforehand which ones will go. lists them afterwards, once they are gone. Also there is no way back. Seems to work testing it this afternoon though.

You could have the batch file move the raw files to a temporary folder, that you can inspect before deleting the entire folder manually.

Makes the process easier, with less risk.

I used to work this way, too. I used a batch file to remove any raws without JPGs, but did not like the fact that the DEL command deletes without recycling. I downloaded recycle.exe from MaDdoG software, which is a replacement for the DEL command, but puts the removed files in the recycle bin.

This is my batch file:

for %%a in (*.cr2) do if not exist %%~na.jpg recycle -f %%a
recycle -f recycle_cr2.bat

I drag a copy of the batch file (recycle_cr2.bat) into the folder of photos and double-click it. The second line removes the copy of the  batch file. Fast and safe, and I can do it all in Windows File Explorer.

Lightroom is fast enough on my computer that now I simply cull in LR and only shoot raw.

-- hide signature --

George

 gscotten's gear list:gscotten's gear list
Canon EOS 80D Canon EF 400mm f/5.6L USM Canon EF-S 15-85mm f/3.5-5.6 IS USM Canon EF 70-300mm f/4-5.6L IS USM Canon EF-S 10-18mm F4.5–5.6 IS STM +1 more
CAcreeks
CAcreeks Forum Pro • Posts: 13,759
Re: Deleting orphaned raw files
3

woodturner wrote:

When home I take the RAW into DxO after geotagging and generate JPEGS from there that get saved in one storage area which has all the photos from way back when 5mp you could only dream of. (I rank them in DXO). The RAWs and DxO .dop configuration files get saved in separate storage on a different machine, so I can regenerate if necessary.. The camera Jpegs tend to get dumped anyway.

Ah, DxO. The best raw converter.

Some photo viewers can show the JPEG preview embedded in the Raw file. It's usually not as large in pixel dimensions as the regular JPEG, but gives you good hints about color. Possibly you could shoot Raw-only if the preview is good enough to make culling decisions. (I can tell you which photo viewers are preview capable on Linux, but not on Windows.)

I would be interested in whether you decide on PhotoMechanic, or the script solution outlined by gscotten.

OP woodturner Regular Member • Posts: 185
Re: Deleting orphaned raw files

This looks a good way to go, I would like to give it a try.  However I have a couple of questions, as recycle.exe is a little! dated.

Does it work on windows 10?

If so, where do you place it in W10 folder structure so it works?

Thanks,

Eric

 woodturner's gear list:woodturner's gear list
Sony Cyber-shot DSC-WX10 Sony SLT-A57 Sony a77 II Sony DT 18-55mm F3.5-5.6 SAM Tamron AF 70-300mm F/4-5.6 Di LD Macro +7 more
Ludvig Senior Member • Posts: 1,620
Re: Deleting orphaned raw files

Ha, the name "PhotoUtility" sounded familiar (as you mention in your OP), but was part of a program with another main goal (now deleted).

After getting the Surface Go, I needed a simple program for this: Deleting Raw files that didn't have a corresponding jpg file (on the road, on my way back to the hotel after a photo trip or in similar situations where I have some time to clean up a bit before copying everything to may main computer).

So the program (or application or app) below is just doing this:

You can select to move the files to the recycle bin or just delete them (with the checkbox), and you will get a confirmation dialog before removing the files.

If the jpg and raw files are in the same folder, just navigate to that folder for both left and right side, press "Mark raw files" and then the Delete button to remove the files.

To make everything work, you have to shoot jpg + raw of course.

OP woodturner Regular Member • Posts: 185
Re: Deleting orphaned raw files

Great! I struggled for a whole afternoon trying to get photoutility to reliably work with little success, probably due to my incompetence.  However it also seems I was trying to use an old version, as what you show in your comment seems to be subtly different.  I  thought the contact I could see was likely out of date . So I cast my net wider here...

What you show seems to be just what I am looking for, (as long as I can change the search from CR2 to ARW.) I would like to use it in the same way, to cull and clean up the obvious shots that will never be used, and quickly keep the files aligned.

So the obvious question? where can I get hold of it?

Many thanks,

Eric

 woodturner's gear list:woodturner's gear list
Sony Cyber-shot DSC-WX10 Sony SLT-A57 Sony a77 II Sony DT 18-55mm F3.5-5.6 SAM Tamron AF 70-300mm F/4-5.6 Di LD Macro +7 more
gscotten
gscotten Senior Member • Posts: 1,658
Re: Deleting orphaned raw files
1

woodturner wrote:

This looks a good way to go, I would like to give it a try. However I have a couple of questions, as recycle.exe is a little! dated.

Does it work on windows 10?

If so, where do you place it in W10 folder structure so it works?

Thanks,

Eric

Yes, it works fine on Win10. I put recycle.exe in C:\Windows\System32.

-- hide signature --

George

 gscotten's gear list:gscotten's gear list
Canon EOS 80D Canon EF 400mm f/5.6L USM Canon EF-S 15-85mm f/3.5-5.6 IS USM Canon EF 70-300mm f/4-5.6L IS USM Canon EF-S 10-18mm F4.5–5.6 IS STM +1 more
Ludvig Senior Member • Posts: 1,620
Re: Deleting orphaned raw files
2

Sorry for wasting your time struggeling with the 2013 version. And it was less than intuitive to run than this version (really bad I would say today!). I changed the layout a bit to make it easier to run on a touch screen, but I guess it's even better for regular use as well. I also added a setup dialog to be able to remove and add file extensions. The program name is changed to "DeleteRaw" as a more descriptive name.

The new layout for "DeleteRaw" as I now call it

You can download it from here:
www.lsfoto.net/download/DeleteRaw.zip

The zip file contains just a folder and two files: The program file and a ini file. If you delete the ini file, the program will make a new one. No installation needed.

Hope it's working like it should, and I would of course appreciate an update how it works. For this download file, I added the ".ARW" extension to the ini file.

selected answer This post was selected as the answer by the original poster.
OP woodturner Regular Member • Posts: 185
Re: Deleting orphaned raw files

Seems to work great.  A little different from the 2013 version,  it doesn't try to  download from the card, but it is clear and simple!  Suitable for me in other words.  I would want to do the download separately myself anyway.

Just compares, finds the orphans and offers the option of deleting/recycle bin.  Perfect for the objective, and you can see what is happening.

I am even more impressed to find it seems to work on a single folder. I tried a folder  containing a JPEG/RAW pair, a random JPEG and a different random RAW image.  It correctly marked for deletion  the unpaired RAW, and left the JPEGS and the paired RAW alone.

Therefore  I can use this to compare two separate folders, one of JPEG and one of RAW, or a single folder containing JPEG /RAW as from the camera.

That is great as I can take the folder from the camera in a single folder, do a tag and delete the losers in Fastone for example, run your programme to tidy up, then go on when back at base with the heavier duty work, adding GPS, running DxO from there on a smaller folder.

I  have to leave this till tomorrow now, but will test it "in anger" tomorrow on my airshow shots.  Considering the low number of keepers there, it should give your programme a workout!

Many thanks,

Eric

 woodturner's gear list:woodturner's gear list
Sony Cyber-shot DSC-WX10 Sony SLT-A57 Sony a77 II Sony DT 18-55mm F3.5-5.6 SAM Tamron AF 70-300mm F/4-5.6 Di LD Macro +7 more
Ludvig Senior Member • Posts: 1,620
Re: Deleting orphaned raw files

Sounds great, and thanks for the update!

OP woodturner Regular Member • Posts: 185
Re: Deleting orphaned raw files
1

First, many thanks to all the contributors, especially Ludwig, gscotten, and CAcreeks for the help.

In summary, there are two types of solutions, running a small script, and those using Graphical interfaces.

The script approach seems very fast, and with the suggestion from gscotten to use Recycle.exe can mean you have some way back if you make a mistake. Various smarter people than me have offered various scripts, and other ones can be found on the web.

There is Photo orientated software and also general file browser/comparison utilities with a GUI that can be adjusted to find orphan RAW files. Examples are Photomechanic, Beyond Compare and Winmerge, others may well be available. However these are larger more complex programmes designed to be very powerful , doing many things so there is a learning curve, and they are not focused on this specific issue, and may duplicate software you are already familiar with.

Finally Ludwig shared his very simple but effective programme DeleteRaw that for me hits the nail exactly on the head. It is aimed specifically at the orphan Raw files, is simple, and you can see what is going to happen before you do it. It will also find the orphans in a single folder of mixed RAW/JPEG like the file I get from the camera.

So I have marked Ludwigs as the answer to my question, but would really like to also mark gscotten as well, as they are both simple working solutions, it is just that they are different. I personally am less used to running little command line programmes, and prefer a GUI. I also don’t feel like going for a bigger more generalist programme just now.

Your preference may well be different.

Thanks again to all contributors, this has been a great help,

Eric

 woodturner's gear list:woodturner's gear list
Sony Cyber-shot DSC-WX10 Sony SLT-A57 Sony a77 II Sony DT 18-55mm F3.5-5.6 SAM Tamron AF 70-300mm F/4-5.6 Di LD Macro +7 more
Ludvig Senior Member • Posts: 1,620
Re: Deleting orphaned raw files
1

Thanks again for the update!

I have changed the web page layout so just navigate to www.lsfoto.net/download and it will show some information about the program, and if any updates are made.

Direct download: www.lsfoto.net/download/DeleteRaw.zip
Web page: www.lsfoto.net/download

Not really needed information, but the files are scanned with the last version of Microsoft Virus and threat protection before uploading. The program only has two functions: Mark the raw files and delete/send to recycle bin. Raw file extensions can be added or removed from the setup dialog (probably the smallest and easiest setup dialog you have seen in your life!).

Keyboard shortcuts:
FForum MMy threads