Skip to content

Instantly share code, notes, and snippets.

@drweaver
Created December 4, 2016 20:29
Show Gist options
  • Save drweaver/eb4db97e62c48a6e78b21ab8eb1b0284 to your computer and use it in GitHub Desktop.
Save drweaver/eb4db97e62c48a6e78b21ab8eb1b0284 to your computer and use it in GitHub Desktop.
@echo off
mode con:cols=100 lines=75
set PATH=%PATH%;c:\users\shane\bin
set DNGC="C:\Program Files (x86)\Adobe\Adobe DNG Converter.exe"
set OPTS=-c -fl
set DNGFOLDER=C:\Users\shane\Pictures\dng
echo Current Directory is %cd%
echo Current batch run is %0 %~dpnx0
echo Subject is %1 %~dpnx1
echo Folder name is %~n1
if not exist "%DNGFOLDER%\%~n1" mkdir "%DNGFOLDER%\%~n1"
for /r %1 %%a in (*.CR2) do (
echo Converting: "%%a"
%DNGC% %OPTS% "%%~a"
move "%%~dpna.dng" "%DNGFOLDER%\%~n1"
)
echo Conversion Complete
pause
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment