How to delete JPG files when RAW photo exists

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
ifennema
New Member
New Member
Posts: 1
Joined: 2019-06-29, 12:03 UTC

How to delete JPG files when RAW photo exists

Post by *ifennema »

While organizing my extensive photo library (100K+ photos, over 1TB in size), I was looking for a way to save space by deleting JPG files for photos where I have the original in RAW format (e.g. NEF, ORF, CR2). After extensive search on the internet, I have not found an easy to use solution for this.
Therefore, I have built a PowerShell script to do this for me - instead of managing it manually: it lists JPG and PNG files recursively in a folder tree, and checks if a RAW file with the same filename exists. If it does, it can either move the JPG/PNG to a separate location (trash folder on my NAS) or delete it, depending on the startup parameter.
It took me some time to develop, however figured how cool would it be if TC could do this natively?

As last step in organizing and cleaning up my photo library is running file deduplication using TreeSize Pro Duplicate File Finder and removing empty folders, compacting my photo store even a bit further.
User avatar
Stefan2
Power Member
Power Member
Posts: 4133
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Re: How to delete JPG files when RAW photo exists

Post by *Stefan2 »

Hi and welcome, ifennema.

Doing such special task on your own with an script is pretty fine
and the expected way, as is no good idea to implement all possible features into TC.

There are programs going this way, but what to do with dozens menu entries
you would never need in your life time, only some user will do sometimes?

So TC provides you the most important feature set and support the script writer
by e.g. parameters for current and target path and selected files,
so you can run your scripts with arguments from current field of work.

BTW, it would be nice of you if you could share your script here for others with same need?

TIA :D

[MTAG]
User avatar
Hacker
Moderator
Moderator
Posts: 13052
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Re: How to delete JPG files when RAW photo exists

Post by *Hacker »

ifennema,
how cool would it be if TC could do this natively
Num+

Code: Select all

*.nef>*.jpg
Enter, Num-

Code: Select all

*.nef
Enter

HTH
Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
Post Reply