#1 2012-08-02 12:24

Lila
Member
Registered: 2012-08-02
Posts: 3

Image Number in RAW-Ready ReNamer

I recently downloaded ReNamer and am quite amazed, it is a very good programme.
I soon had to rename RAW-Files (.cr2 in my case) and downloaded the RAW-Ready-zip therefore.

The problem I have is now:
If I rename, say "IMG_0910.cr2" using ReNamer, the new title is "2011-07-13_14-32-24.cr2" but I would like to keep the original Image Number, so that it looks like this: "2011-07-13_14-32-24_0910.cr2".

Is there a possibility to reach this result?

Thanks in advance,
Lila

Offline

#2 2012-08-02 16:10

Stefan
Moderator
From: Germany, EU
Registered: 2007-10-23
Posts: 1,161

Re: Image Number in RAW-Ready ReNamer

Lila wrote:

I recently downloaded ReNamer and am quite amazed, it is a very good programme.
I soon had to rename RAW-Files (.cr2 in my case) and downloaded the RAW-Ready-zip therefore.

The problem I have is now:
If I rename, say
"IMG_0910.cr2"
using ReNamer, the new title is
"2011-07-13_14-32-24.cr2"
but I would like to keep the original Image Number, so that it looks like this:
"2011-07-13_14-32-24_0910.cr2".

Is there a possibility to reach this result?

Thanks in advance,
Lila

Hi Lila, welcome.

You can do this by modifying the PascalScript "{ Insert EXIF date from RAW images }"
which is included into the "ReNamer-5.05-RAW-Ready.zip"  (http://www.den4b.com/forum/viewtopic.php?pid=1256#p1256)
and which does the work here for you.
(read more about PascalScript in our wiki > http://www.den4b.com/wiki/ReNamer:Rules:PascalScript)



For your case edit the script (in ReNamer double click on it)
scroll down to the bottom and change that part

from:

var
  Command, Output: string;
  DateTime: TDateTime;

begin
  Command := '"'+EXIV+'" "'+FilePath+'"';
  ExecConsoleApp(Command, Output);
  if TryExtractDate(Output, DateTime) then
    FileName := FormatDateTime(DTFORMAT, DateTime) +
      WideExtractFileExt(FileName);
end.

to:
The code with the changed parts highlighted:

var
  FourSigns, Command, Output: string;
  DateTime: TDateTime;

begin
  //FileName: "IMG_0910.cr2"
  //FourSigns: "0910"
    FourSigns := WideCopy(FileName,4,4);

  Command := '"'+EXIV+'" "'+FilePath+'"';
  ExecConsoleApp(Command, Output);
  if TryExtractDate(Output, DateTime) then
    FileName := FormatDateTime(DTFORMAT, DateTime) + '_' + FourSigns +
      WideExtractFileExt(FileName);
end.


The trick here is to extract from pos.4 on 4 signs from the original FileName and store them in an new variable "FourSigns"
FourSigns := WideCopy(FileName,4,4);

then adding this with an additional underscore " + '_' + " to the new FileName.


Please test this with some test files if i made no mistake (since i had no RAW file to check.


HTH? big_smile
If yes, read my signature please.

.


Read the  *WIKI* for HELP + MANUAL + Tips&Tricks.
If ReNamer had helped you, please *DONATE* to Denis or buy a PRO license. (Read *Lite vs Pro*)

Offline

#3 2012-08-03 11:44

Lila
Member
Registered: 2012-08-02
Posts: 3

Re: Image Number in RAW-Ready ReNamer

It almost did the trick. I had to change one number from (FileName,4,4) to (FileName,5,4) to get the desired result. Otherwise it looked something like "2010-07-13_20-30-41__106.cr2" instead of "2010-07-13_20-30-41_1064.cr2".

Thanks for that. big_smile

Another, final question: I used 
Insert   - Insert ":EXIF_Model:" as Prefix
Translit - Transliterate Canon EOS 550D->A

as rules for my .jpg-Files (i.e. "2011_04_12_13_24_42_A0835.jpg").

But for RAWs, the Exif-Model is not even recognised. Are you able to include this rule into the script?
I'm sorry, I would like to do it on my own, but apart from rather logical interventions (i.e. changing the numbers from 4 to 5) there is nothing I can do, really.

Offline

#4 2012-08-03 14:43

Stefan
Moderator
From: Germany, EU
Registered: 2007-10-23
Posts: 1,161

Re: Image Number in RAW-Ready ReNamer

Lila wrote:

It almost did the trick. Thanks for that. big_smile

Thanks for the feedback.


Another, final question:
But for RAWs, the Exif-Model is not even recognized.
Are you able to include this rule into the script?

No sorry, i have no skill for that.


Read the  *WIKI* for HELP + MANUAL + Tips&Tricks.
If ReNamer had helped you, please *DONATE* to Denis or buy a PRO license. (Read *Lite vs Pro*)

Offline

#5 2012-08-03 23:09

Andrew
Senior Member
Registered: 2008-05-22
Posts: 542

Re: Image Number in RAW-Ready ReNamer

Different cameras have different RAW formats, so to enable ReNamer to detect the EXIF_Model for each would require Denis to know the details of all the formats and modify the internal parser accordingly.

Offline

#6 2012-08-04 00:49

Lila
Member
Registered: 2012-08-02
Posts: 3

Re: Image Number in RAW-Ready ReNamer

So, this would lead to a hell of a lot work because the programme itself needed to be changed ("internal parser")?
Meaning, even with the format details at hand it would be impossible to simply write another PascalScript?
Is that correct?

Offline

#7 2012-08-04 12:36

Stefan
Moderator
From: Germany, EU
Registered: 2007-10-23
Posts: 1,161

Re: Image Number in RAW-Ready ReNamer

Lila

There are a few command line tools handling exif properties.

If you find one working for "your" RAW format
and provide us the needed command line
someone  here can create an script for you.

Like Denis did there:
http://www.den4b.com/forum/viewtopic.php?id=407
http://www.den4b.com/forum/viewtopic.php?id=109



.


Read the  *WIKI* for HELP + MANUAL + Tips&Tricks.
If ReNamer had helped you, please *DONATE* to Denis or buy a PRO license. (Read *Lite vs Pro*)

Offline

Board footer

Powered by FluxBB