Page 1 of 1

Image names on D70S

PostPosted: Tue May 01, 2007 2:07 pm
by BullcreekBob
G'day Gurus and inspiring ones

I have had a D70S, for many happy months, my images have filenames of the form DSC_nnnn.nef

When out last weekend, some (most) but not all of the filenames were _DSCnnnn.nef I don't know why the filename format changed, nor do I like it because it changes the order in the folder and in Bridge and mt other viewing software.

Can someone tell me;
- why?
- how to stop it from happening?
- how to rename the batch of files back to the previous filename format?

Thanks
Bob in Bull Creek

PostPosted: Tue May 01, 2007 2:08 pm
by losfp
Have you changed your colour space? From memory, this will result in the underscore moving around like a mad thing :)

PostPosted: Tue May 01, 2007 2:12 pm
by daniel_r
As Des has suggested, I'm pretty sure the underscore placement in the filename changes from DSC_1234.NEF (sRGB modes) to _DSC_1234.NEF (AdobeRGB mode). Can't be 100% sure, but I think it's that way around.

PostPosted: Tue May 01, 2007 2:14 pm
by radar
Images are named using the following convention: DSC_####.JPG for sRGB images and _DSC####.JPG for AdobeRGB images, where #### is 0001 - 9999. File numbering is maintained ever if you switch or erase memory cards.


The _ should not move around :? once you are in a certain colour space.

I believe this is the convention in most if not all of Nikon's DSLRs

Certainly for D70, D80, D200 that I have found.

André

PostPosted: Tue May 01, 2007 2:30 pm
by bwhinnen
Yep only changes when you are in a specific colour space.

As indicated by André's post sRGB is DSC_####.XXX and AdobeRGB is _DSC####.XXX.

You will find that Auto mode will always default to sRGB and the other 'proper' modes will default to the colour space you have chosen. I used to see it when Vicki borrowed the D70 all the time, she shot in Auto mode and I shot in S, A, or M modes ;)

PostPosted: Tue May 01, 2007 2:32 pm
by Yi-P
daniel_r wrote:As Des has suggested, I'm pretty sure the underscore placement in the filename changes from DSC_1234.NEF (sRGB modes) to _DSC_1234.NEF (AdobeRGB mode). Can't be 100% sure, but I think it's that way around.



That is exactly right.

When using IIIa (sRGB) colour space, the naming is under Windows standards in being DSC_xxxx.NEF.

When using mode IIa (Adobe RGB) it is named under Mac files as being _DSCxxxx.NEF, to some extent I believe this is to avoid incompatibility with some of those older Mac.

These from memory, it was from the camera manual. If you still have it around, it say clearly there.

PostPosted: Tue May 01, 2007 3:35 pm
by BullcreekBob
G'day

THANKS guys. Yup, page 41 of the D70S manual tells me that when using Colour Mode II, the filename format wll change. And yes, I as trying a different colour mode for some settings.7.

Now, any answers to the "How to rename files?" question, so I can put the files back such that the filename alphabetically matched the sequence in which they were taken? I can't get the DOS commands of xcopy or ren to do what I want.

There really is great knowledge to be aquired here. One day, someone will ask something I can answer.

PostPosted: Tue May 01, 2007 4:37 pm
by johnd
Bob it's easy to fix your filenames if you have Photoshop CS2. In Bridge (part of CS2), you select the files to be renamed, then click on Tools > Batch Rename and in the box build the filename string up as Text = "_DSC" + Metadata = UniqueID. That puts _DSC in front of the unique file number from the image. I'm sure there are other ways too.
Cheers
John

PostPosted: Tue May 01, 2007 5:04 pm
by bwhinnen
I have a perl script that does all the renaming for me back to DSC_#####.XXX for me as all my files are stored on a Linux box (where the first # is a number I choose based on how many times I have gone passed #### :D).

But the same principle applies in DOS, a rename _DSC####.JPG to DSC_####.JPG should work fine. Or just do it under Windows Exploder. You could write a little .bat script to do it all for you as well if you wanted to.

Sample (simplistic) code for a DOS box...

Code: Select all
:: Script to rename AdobeRGB colour space filenames to sRGB colour space
:: filenames for Nikon Cameras, DOS batch file.
::
:: Written by Brett Whinnen - Brett@rpmphotography.com.au
::
:: Save as renamedsc.bat
::
:: Usage:
::    renamedsc [Number] _XXX*.XXX
::
::    Number (optional) can be anything to prefix onto the four digit
::    number from camera, e.g. _DSC1234.JPG can be renamed to
::    DSC_21234.JPG to indicate 20000   photos have been taken.
::
::    _XXX*.XXX will cover any naming convention from _DSC1234.JPG to
::    _DSC1234.NEF or _POR1234.JP to _POR1234.NEF and so forth.
::

@ECHO OFF

:strt
   set pref=%1
   IF "%pref:~0,1%" NEQ "_" (
      shift
      goto :for
   )
   set pref=

:for
   FOR %%A in (%*) DO (call :do_rename %%A)
   goto:eof

:do_rename
      set teststr=%1
      IF "%teststr:~0,1`%" == "_" (
         echo Renaming %teststr% to %teststr:~1,3%_%pre%%teststr:~4%
         ren %teststr% %teststr:~1,3%_%pref%%teststr:~4%
      )
      goto :eof



Cheers
Brett

PostPosted: Tue May 01, 2007 6:56 pm
by BullcreekBob
G'day

Once again - "Thanks Guys"