Handling JPEG’s in Lightroom Import

I am sick and tired of Lightroom importing both RAW- and JPG-files!

Whenever I import raw-files, it imports the jpgs as well. Suddently, I have a lot of redundant jpgs. However, sometimes I like to generate additional jpgs – or shoot jpgs only. Hence, I cannot just delete all jpegs.

Disabling JPG-copies and shoot RAW only with my camera is also not a good option. In playback mode, I am able to zoom in to a greater detail on the JPEGS compared to the RAW-files. I also like to see Black and White simulations instantly to evaluate the light setup.

Desperate measures…

A month ago, my hard drive was almost full. I started to examine my RAW-file folders, and I found a lot of redundant JPEGS. More than 300Gb of redundant jpegs from years of shooting was piled up and never accessed or used. However, I couldn’t just to delete all jpegs. I didn’t want to delete jpegs from panorama-shots and other special occasions. But manually comparing and deleting ten thousands of files was not my cup of tea!

Heureka – A script!

My solution has been to create a script to my Windows-PC, that takes care of examining the jpgs-file names. If a corresponding RAW-file exists, the script moves the jpg-file into a subfolder. If it cannot find a matching RAW-file, it leaves the jpg-file untouched. After all duplicate jpegs have been moved to a subfolder (named “Duplicates”), I can inspect the jpegs and remove them safely.

Example:

 

A target folder for Lightroom import. Here with redundant jpgs
Dropping a file on the script starts the script.
The script makes a search and reports a status before moving the files
Afterwards, only non-redundant jpeg-files are in the folder

 

My batch-script is as follows:

Create a script-file “MoveDuplicates.bat” on your desktop, choose edit and paste this into the file:

@echo off
echo Parameters:
echo Parameter............. : %0 %1
echo Directory to be tested : %~d1%~p1
echo Filename (not used)... :%~n1
%~d1
chdir %~p1
if errorlevel == 1 (goto :out)
echo ######
echo TESTING FOR DUPLICATE FILENAMES (.jpg and .RAF)
SET X =NO
for %%F in ("*.jpg") do (
IF EXIST "%%~dF%%~pF%%~nF.RAF" (SET X=YES)
)
IF "%X%" == "NO"  (GOTO :out)
echo DUPLICATES FOUND, PRESS ENTER TO START MOVING REDUNDANT JPGs
echo #####
pause
if not exist "./DUBLICATES" mkdir DUBLICATES
for %%F in ("*.jpg") do (
IF EXIST "%%~dF%%~pF%%~nF.RAF" (move "%%F" ".\DUBLICATES")
)
:out
pause

Gordon

As an enthusiastic amateur photographer, I spend most of my spare time finding the next photo opportunity. I favor landscape photography and portraiture, and challenge myself with street.

%d bloggers like this: