for /f “tokens=*” %x in (‘dir /b *.nef’) do dcraw -e %x

Sorry, being a total geek here.

If you are also a command line geek you will look at the above and go Ahhhh…

Otherwise, it means nothing and you can skip over this post. ¬†ūüôā

For the rest of you — the above “converts” NEF files into JPG faster than anything you have ever seen before.

And is great for converting 250 NEF files you snapped of something totally unimportant that should have been shot in jpg and not raw.

For example: we visited a couple of flats/apartments this weekend (thinking about moving) and I put a Sigma 10-20mm Best of the Best 4: Without Warning hd on my D300 and walked around shooting absolutely everything. ¬†The idea was that once we got home if we thought “hey, was there an xyz in the whatever room of that second one” or something like that we could jsut refer to the images rather than go back or phone and ask. ¬†So to cover everything, even at super wide, I was shooting like crazy. ¬†Barely aiming, not bothering to focus (and that lens managed fine actually, very well for this purpose).

But I got home and found I had 250+ raw files — or almost 4G of data! ¬†Drat, should have switched to jpg for these snapshots, but now what do I do? ¬†Sure I can batch them through ACR or photoshop, but it’ll take forever.

So luckily I had just been looking at dcraw, the command line raw processor recently, I had the Windows build, and tada.

for /f "tokens=*" %x in ('dir /b *.nef') do dcraw -e %x

An command line that takes all the raw files in the directory and spits out jpg files instead. ¬†After that I just del *.nef and I’m done.

Up side:

  • Fast
  • No settings to worry about
  • Fast
  • Did I mention fast? ¬†We are talking less than a second an image.


  • It isn’t really converting the raw fileof course, it is merely extracting the basic Jpeg that is embedded in the raw file. ¬†But that’s “good enough” for what I wanted.

Still a good trick and to save me having to think about the syntax next time I have to do this I’m blogging about it so I can go back and refer to my own blog. ¬†I knew there was a reason I was blogging!

And of course now that I know dcraw can do this I’ll be looking to integrate raw preview into Camera Control using this. ¬†In my copious free time! ¬†Huh!

PS.  There should have been a video today about how to do the paper grid spot, but I totally messed up the recordings and all the files are a disaster so this too will have to wait for another time.