Author Topic: File Renumbering Error  (Read 5773 times)

Offline Bob Hendricks

  • Member
  • **
  • Posts: 82
    • View Profile
File Renumbering Error
« on: April 18, 2020, 05:07:29 AM »
There is a bug in the file renumbering algorithm. See attached screenshot of a set of files that were taken with a Nikon camera and then processed in DxO PhotoLab 3. I need to renumber these files. The original file is of the form DSC_1234.NEF. After processing, PL 3 outputs a sidecar of the form DSC_1234.NEF.dop. I want to renumber the files without the leading DSC_ and start with a new base number. I can easily strip the DSC_ and then try to renumber in PM 6. When I renumber these files, PM 6 correctly renumbers both as 05678.NEF and 05678.NEF.dop giving both the base raw image and the sidecar the same number.

Here is the problem. After processing the image, I wish to output either (or both) a jpg and/or a dng image. In both cases, as seen in the attached, DxO/PL 3 outputs files of the form DSC_1234_DxO.jpg and DSC_1234_DxO.dng.  If I strip the lead DSC_, as above, then when I renumber the set, Photo Mechanic drops the _DxO and treats these as new images, thus incrementing the counter by 1 for each of these images.This is catastrophic in that the collection of images is now separated.

I have tried several tricks, such as replacing the _DxO in the base name to a .DxO thus giving a file name 01234.DxO.dng or 01234.DxO.jpg.  In both cases the DxO is ignored and the counter is incremented.  I have also tried a combination such as 01234.NEF.dng  and 01234.NEF.jpg (since that seems to work with the dop files) and if it numbers correctly, then I can easily change the format back by replacing the NEF by DxO. However, these ideas also fail.

Is there a reason why the renumbering scheme cannot append the trailing _DxO , or is this a simple oversight because no-one using PhotoLab has run into this issue and thus the problem has never arisen?

Is it possible to correct the renumbering algorithm to correct this issue? 
 
Bob Hendricks

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: File Renumbering Error
« Reply #1 on: April 18, 2020, 10:06:35 AM »
Bob,

There is a bug in the file renumbering algorithm. See attached screenshot of a set of files that were taken with a Nikon camera and then processed in DxO PhotoLab 3. I need to renumber these files. The original file is of the form DSC_1234.NEF. After processing, PL 3 outputs a sidecar of the form DSC_1234.NEF.dop. I want to renumber the files without the leading DSC_ and start with a new base number. I can easily strip the DSC_ and then try to renumber in PM 6. When I renumber these files, PM 6 correctly renumbers both as 05678.NEF and 05678.NEF.dop giving both the base raw image and the sidecar the same number.

Here is the problem. After processing the image, I wish to output either (or both) a jpg and/or a dng image. In both cases, as seen in the attached, DxO/PL 3 outputs files of the form DSC_1234_DxO.jpg and DSC_1234_DxO.dng.  If I strip the lead DSC_, as above, then when I renumber the set, Photo Mechanic drops the _DxO and treats these as new images, thus incrementing the counter by 1 for each of these images.This is catastrophic in that the collection of images is now separated.

I have tried several tricks, such as replacing the _DxO in the base name to a .DxO thus giving a file name 01234.DxO.dng or 01234.DxO.jpg.  In both cases the DxO is ignored and the counter is incremented.  I have also tried a combination such as 01234.NEF.dng  and 01234.NEF.jpg (since that seems to work with the dop files) and if it numbers correctly, then I can easily change the format back by replacing the NEF by DxO. However, these ideas also fail.

Is there a reason why the renumbering scheme cannot append the trailing _DxO , or is this a simple oversight because no-one using PhotoLab has run into this issue and thus the problem has never arisen?

Is it possible to correct the renumbering algorithm to correct this issue? 

Can you show me what you're using as your renaming string in PM?

-Kirk

Offline Bob Hendricks

  • Member
  • **
  • Posts: 82
    • View Profile
Re: File Renumbering Error
« Reply #2 on: April 18, 2020, 10:54:35 AM »
Kirk:

Attached is the popup for a typical renaming. If I append _DxO in the renaming string, it will append to all images with the sequelence number, which is not what we want.

I have found another, much simpler example.  I have a series of files named DSC01234.jpg and DSC01234_edited.jpg. These were generated about a decade ago by iPhoto. Some of the files in the sequence have been edited, some have not.  Again, when there is an edited pair, you want to have the same sequence number on each and to retain the suffix _edited.

I have looked for various tricks to do this, but have not found one.  Am I missing something, or is what I want to do not possible in PM6+

Many thanks

Bob
Bob Hendricks

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: File Renumbering Error
« Reply #3 on: April 18, 2020, 01:21:24 PM »
Bob,

Attached is the popup for a typical renaming. If I append _DxO in the renaming string, it will append to all images with the sequelence number, which is not what we want.

I have found another, much simpler example.  I have a series of files named DSC01234.jpg and DSC01234_edited.jpg. These were generated about a decade ago by iPhoto. Some of the files in the sequence have been edited, some have not.  Again, when there is an edited pair, you want to have the same sequence number on each and to retain the suffix _edited.

I have looked for various tricks to do this, but have not found one.  Am I missing something, or is what I want to do not possible in PM6+

Each item selected for renaming will get its own sequence.  In your simpler example, you're seeing two thumbnails in the contact sheet.  They are individual items and will be renamed individually.  This is by design and not a bug.

You could try using Find and Replace in filenames, but it won't sequence.

-Kirk

Offline Bob Hendricks

  • Member
  • **
  • Posts: 82
    • View Profile
Re: File Renumbering Error
« Reply #4 on: April 19, 2020, 09:29:00 AM »
Hi Kirk:

Thanks for the explanation. 

Since DxO appends the suffix _DxO to the base name of the file and keeps the same file number as the original file, it is important for PhotoLab users to be able to renumber files and keep the same sequencing. Do you have any interest in giving the user  a choice of numbering in either the present way or in the way needed by PL3? Should this be entered in the list of New Features?

In the meantime, I have written a short AppleScript that accomplishes the task.  If there is any interest, I will be happy to share it. Interested Photo Mechanic users should e-mail me separately and I can reply with the code. (Sorry--it will not work on PCs).

Bob
Bob Hendricks

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: File Renumbering Error
« Reply #5 on: April 19, 2020, 11:44:06 AM »
Bob,

Since DxO appends the suffix _DxO to the base name of the file and keeps the same file number as the original file, it is important for PhotoLab users to be able to renumber files and keep the same sequencing. Do you have any interest in giving the user  a choice of numbering in either the present way or in the way needed by PL3? Should this be entered in the list of New Features?

I don't think we would attempt such a renaming system.  Scripting (shell, DOS, AppleScript, or even Python or Ruby) would be better suited for this type of task.

-Kirk

Offline LarsN

  • Member
  • **
  • Posts: 52
    • View Profile
Re: File Renumbering Error
« Reply #6 on: April 19, 2020, 11:22:06 PM »
One alternative is to rename / renumber your NEF files when you first ingest them to your computer. Photo Lab 3 will return the same name/number for your jpg, dng and sidecar file, with or without the suffix.

The suffix _DxO is optional and my copy of PL3 do not change any numbering.

Lars

Offline Bob Hendricks

  • Member
  • **
  • Posts: 82
    • View Profile
Re: File Renumbering Error
« Reply #7 on: April 21, 2020, 07:32:33 PM »
Lars:

Thanks for the note. It is my intention to do the renaming on ingestion as you suggest, once I get my collection in order.  I am looking at about 35K files taken on about  five cameras, all with different numbering schemes and in several cases with duplicate file names.  Right now my task is to get this mess straightened out and then get the image metadata applied and get them catalogued with PM6+.  Since I live in a community where we are pretty much confined to our homes, I have lots of time to work on it!

Be safe--and thanks

Bob
Bob Hendricks