Topic: Avoid _001 with different extension

Hi.

I take lots of raw pictures with my camery. Infact, I use the option jpg+raw, hence date and time of both shots are identical. I use the following expression:

%Xdod-%Xdot-c%ncs.%le

Source files ...

IMG_9378.CR2
IMG_9378.JPG

... result in ...

20070726-093747-c.cr2
20070726-093747-c_001.jpg

Any idea how I can easily can get rid of the _001 for the .jpg?

Many thanks!

Re: Avoid _001 with different extension

Hello,

You can use an expression like: %le@%Xdod-%Xdot-c%ncs.%le;%f[2,"@"]

In the "Examples" option of the "?" menu, a similar case is explained: "Rename associated files while renumbering them".

Of course what you need is a bit different but the principle is the same.

If you get
20070726-093747-c.cr2
20070726-093747-c_001.jpg

It's because the extension is not taken into account when "%ncs" is evaluated.
Only the text before it is used.
So, the idea is to temporarily add the extension before "%ncs".

It's done by using sub-expressions (separated by ';').
The first one will add it and make the "computation", the second will delete it.
As we separated the extension from the rest with a '@', the removal is based on the same character.

Hoping this will help.

Best Regards

Re: Avoid _001 with different extension

Tricky again, but it works fine. Thanks!

Is it possible to add in the next Siren release a %ncs variant which considers the extension?

Regards,

Re: Avoid _001 with different extension

I'll try to have a look at it.

Bye.