Author Topic: Duplicate Files - Warning vs Rename  (Read 11367 times)

Offline chrismoseleyphoto

  • Newcomer
  • *
  • Posts: 2
    • View Profile
Duplicate Files - Warning vs Rename
« on: June 21, 2007, 09:52:32 AM »
Trying to figure out how to have PM give me a warning - when I'm copying a file from one folder to another - that there is already a file in the new folder that has the same name. The only thing I can find is an option to tell PM how to rename it. Windows does this, ACDSee Photo does this. Surely I'm missing something.

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 21346
    • View Profile
    • Camera Bits, Inc.
Re: Duplicate Files - Warning vs Rename
« Reply #1 on: June 21, 2007, 11:45:19 AM »
Trying to figure out how to have PM give me a warning - when I'm copying a file from one folder to another - that there is already a file in the new folder that has the same name. The only thing I can find is an option to tell PM how to rename it. Windows does this, ACDSee Photo does this. Surely I'm missing something.

No, we rename the source file when it collides with a file at the destination.  May I ask why are you copying the same files over and over to the same location?

-Kirk

Offline vAfotoriporter

  • Uber Member
  • ******
  • Posts: 1029
    • View Profile
    • Attila Volgyi photojournalist
Re: Duplicate Files - Warning vs Rename
« Reply #2 on: September 04, 2007, 09:00:19 AM »
My actual problem is similar: I have a lot of files in a folder to work with. I want to rename them to a hourmiutesecond format supposing that PM automatically renames if there is a name collision. But I keep receiveing a not really descriptive error message : There was an error so PM cancels and restores the old file names. I don't know the nature of the problem so I can only imagine the problem should be the name collision and don't understand why PM doesn't handle it by adding a number to the coliding filename like any other time it does.
Working on Mac, OSX, iOS and with some Canons.
Allways shooting RAW.

http://www.volgyiattila.com

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 21346
    • View Profile
    • Camera Bits, Inc.
Re: Duplicate Files - Warning vs Rename
« Reply #3 on: September 04, 2007, 10:40:14 AM »
My actual problem is similar: I have a lot of files in a folder to work with. I want to rename them to a hourmiutesecond format supposing that PM automatically renames if there is a name collision. But I keep receiveing a not really descriptive error message : There was an error so PM cancels and restores the old file names. I don't know the nature of the problem so I can only imagine the problem should be the name collision and don't understand why PM doesn't handle it by adding a number to the coliding filename like any other time it does.

What is your exact renaming string?

-Kirk

Offline vAfotoriporter

  • Uber Member
  • ******
  • Posts: 1029
    • View Profile
    • Attila Volgyi photojournalist
Re: Duplicate Files - Warning vs Rename
« Reply #4 on: September 04, 2007, 11:27:52 AM »
What is your exact renaming string?

It has been {year2}{month0}{day0}{hour24}{minute}{second}

Since subseconds don't work with my images I hoped PM will automaticalli append letters, but seemingli it didn't. A more specific error message would help to understand the situation causing the problem.

After many tries I solved the problem with appending {seqn:-1,1} so creating my own subsecond identifier. It works well but the earlyer renaming issue is still unclear for me. I think a simple name conflict shouldn't stop a mass renaming and should be overcome by adding the extra letter like any time else...
Working on Mac, OSX, iOS and with some Canons.
Allways shooting RAW.

http://www.volgyiattila.com

Offline Hayo Baan

  • Uber Member
  • ******
  • Posts: 2523
  • Professional Photographer & Software Developer
    • View Profile
    • Hayo Baan - Photography
Re: Duplicate Files - Warning vs Rename
« Reply #5 on: September 04, 2007, 11:48:48 PM »
It has been {year2}{month0}{day0}{hour24}{minute}{second}

While as of yet I can't give you any insight in why your rename doesn't work, you could rewrite it a lot simpler as follows (and this one also appends the subseconds if available, automatically):
    {datesort}{timesortlong}
Note: {datesort} includes the full 4 digit year, if you don't wont that, use {datesort:2} ;)

By the way, I use a very similar renaming scheme; mine is in fact {datesort}_{timesortlong}_{model:6}
This way, with the two camera's we own, we get 100% unique file names (I found that even the subsecond can be the same sometimes when you shoot together).

To "fake" the subsecond in your case, you could try to use:
    {datesort}{timesortlong}{seqn:-2,2}
This is nicer than your one digit only version :)

Hope this helps.
Hayo Baan - Photography
Web: www.hayobaan.nl

Offline vAfotoriporter

  • Uber Member
  • ******
  • Posts: 1029
    • View Profile
    • Attila Volgyi photojournalist
Re: Duplicate Files - Warning vs Rename
« Reply #6 on: September 05, 2007, 10:13:05 AM »
While as of yet I can't give you any insight in why your rename doesn't work, you could rewrite it a lot simpler as follows (and this one also appends the subseconds if available, automatically):
    {datesort}{timesortlong}
Note: {datesort} includes the full 4 digit year, if you don't wont that, use {datesort:2} ;)

Well thanks you are right it comes to the same.

By the way, I use a very similar renaming scheme; mine is in fact {datesort}_{timesortlong}_{model:6}

This way, with the two camera's we own, we get 100% unique file names (I found that even the subsecond can be the same sometimes when you shoot together).

Subseconds can be the same specially when you shoot remotes! Bot your model identifier works only with different bodies.
I usually have letters signaling which body I used (and I use a code replacement for putting the given letter into the filename from the serial numbers of my bodies).

To "fake" the subsecond in your case, you could try to use:
    {datesort}{timesortlong}{seqn:-2,2}
This is nicer than your one digit only version :)

I don't really need to fake it, just needed some basis to differenciate images taken the same second. You are right two digit seems more like subsecond but the one digit is more like frame number in the second....supposing nobody knows my camera doesn't fire 9 frames a second...
;-)))
Working on Mac, OSX, iOS and with some Canons.
Allways shooting RAW.

http://www.volgyiattila.com

Offline vAfotoriporter

  • Uber Member
  • ******
  • Posts: 1029
    • View Profile
    • Attila Volgyi photojournalist
Re: Duplicate Files - Warning vs Rename
« Reply #7 on: September 14, 2007, 07:23:25 PM »
I don't really understand even if I use a filename {year2}{month0}{day0}{hour24}{minute}{second}{seqn:-1,1} I get some names longer than the others. How can this hapen? I cannot imagine a situation where a filename ending with {seqn:-1,1} can be the same twice following. It is supposed to give a number changing 0-9 changing with each filename. How can it happen to give me the exact same filename twice to need an additional 1 added by PM? In theory this should work fine. What can be wrong in the practice? Any ideas?
Working on Mac, OSX, iOS and with some Canons.
Allways shooting RAW.

http://www.volgyiattila.com

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 21346
    • View Profile
    • Camera Bits, Inc.
Re: Duplicate Files - Warning vs Rename
« Reply #8 on: September 14, 2007, 08:21:26 PM »
szurkebarat,

I don't really understand even if I use a filename {year2}{month0}{day0}{hour24}{minute}{second}{seqn:-1,1} I get some names longer than the others. How can this hapen? I cannot imagine a situation where a filename ending with {seqn:-1,1} can be the same twice following. It is supposed to give a number changing 0-9 changing with each filename. How can it happen to give me the exact same filename twice to need an additional 1 added by PM? In theory this should work fine. What can be wrong in the practice? Any ideas?

Can you post some example filenames so I can see what you're talking about?

Thanks,

-Kirk

Offline vAfotoriporter

  • Uber Member
  • ******
  • Posts: 1029
    • View Profile
    • Attila Volgyi photojournalist
Re: Duplicate Files - Warning vs Rename
« Reply #9 on: September 17, 2007, 05:26:12 AM »
Can you post some example filenames so I can see what you're talking about?

Of course, the first column is the filename after a rename using {year2}{month0}{day0}{hour24}{minute}{second}{seqn:-1,1} and the second column is the original filename out of camera:

0709081544231 original filename JU4H9180
0709081544491 original filename JU4H9181
0709081545081 original filename JU4H9182
0709081545151 original filename JU4H9183
0709081545171 original filename JU4H9184
07090815451711 original filename JU4H9185
0709081545231 original filename JU4H9186
0709081548351 original filename JU4H9203
0709081557101 original filename JU4H9233
0709081557131 original filename JU4H9234
07090815571311 original filename JU4H9235
0709081557221 original filename JU4H9236
07090815572211 original filename JU4H9237
0709081557431 original filename JU4H9238
0709081557501 original filename JU4H9239
0709081600571 original filename JU4H9240
0709081602531 original filename JU4H9248

As I see the last digit used from the seqn variable stayed allways the same=1. I dind't notus it, but nor do I understand the why now. Will try to check it somehow.
Working on Mac, OSX, iOS and with some Canons.
Allways shooting RAW.

http://www.volgyiattila.com

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 21346
    • View Profile
    • Camera Bits, Inc.
Re: Duplicate Files - Warning vs Rename
« Reply #10 on: September 17, 2007, 06:55:04 AM »
szurkebarat,

Can you post some example filenames so I can see what you're talking about?

Of course, the first column is the filename after a rename using {year2}{month0}{day0}{hour24}{minute}{second}{seqn:-1,1} and the second column is the original filename out of camera:

0709081544231 original filename JU4H9180
0709081544491 original filename JU4H9181
0709081545081 original filename JU4H9182
0709081545151 original filename JU4H9183
0709081545171 original filename JU4H9184
07090815451711 original filename JU4H9185
0709081545231 original filename JU4H9186
0709081548351 original filename JU4H9203
0709081557101 original filename JU4H9233
0709081557131 original filename JU4H9234
07090815571311 original filename JU4H9235
0709081557221 original filename JU4H9236
07090815572211 original filename JU4H9237
0709081557431 original filename JU4H9238
0709081557501 original filename JU4H9239
0709081600571 original filename JU4H9240
0709081602531 original filename JU4H9248

As I see the last digit used from the seqn variable stayed allways the same=1. I dind't notus it, but nor do I understand the why now. Will try to check it somehow.

By using {seqn:-1,1} you're using only the last digit of the sequence variable.  For some reason it is not being incremented.  I'd guess that the rename dialog is not seeing the sequence variable when it is used in that manner which would indeed be a bug.  I'll look into it further.

Thanks for the examples.

NEW: it was a bug and I have fixed it.  The fix will appear in the upcoming 4.5.3 update.

-Kirk
« Last Edit: September 17, 2007, 08:43:10 AM by Kirk Baker »

Offline NeilR

  • Full Member
  • ***
  • Posts: 100
    • View Profile
Re: Duplicate Files - Warning vs Rename
« Reply #11 on: October 06, 2007, 05:26:05 AM »
Trying to figure out how to have PM give me a warning - when I'm copying a file from one folder to another - that there is already a file in the new folder that has the same name. The only thing I can find is an option to tell PM how to rename it. Windows does this, ACDSee Photo does this. Surely I'm missing something.

No, we rename the source file when it collides with a file at the destination.  May I ask why are you copying the same files over and over to the same location?

-Kirk


I would like to add my 2 cents as to why I want to do this... my folder structure looks like this:

d:\Event
    NEF Raw
    Nef Best
    JPG Full
    JPG Web
    Print 4x6  (maybe)
    Print 8x10 (maybe, or some other output derived from JPG Full)

All my original NEFs are retained, untouched, in NEF Raw.  I cull out obvious flaws- OOF, etc.  I tag my best images for further work and copy to NEF Best.  I selectively edit these images with Capture NX.  I then do a JPG extract to JPG Full.  I add soft crops to JPG Full (for my web galleries).  I Save as... to JPG Web, applying watermarks and resize accordingly, etc.

All is well, but at this point I critically review JPG Web one last time.  I often see edits I missed, or maybe I don't like the crop when I see it without the crop rectangle.  Now back to Best NEF, where I re-edit with Capture.  Now I want to do an extract on that one image, to JPG Full, then do a Saveas... from JPG Full to JPG Web, and maybe the various print folders or other special output not listed above.

I have to delete the images from each of the cascading target galleries in order to eliminate dups.  My objective is, by default, to get one of each original image in each cascaded target gallery.  If I want two different crops or some other multiple versions, I will handle that with suffixes.  Your copy/rename logic just makes extra work for me by forcing me to delete the images I an imtending to replace.
A "replace" checkbox on the copy and saveas... dialogs would make life much, much easier for these re-edits.  I think it is a mistake to take one's personal workflow and come to conclusions such as "our way is to always rename rather than replace...".  This issue, in conjunction with the issue I just posted to Feature requests, where your Explorer start at folder is inconsistent or, in the case of Extract, simply always starts at My Computer, makes this re-edit workflow very cumbersome, especially since the nature of this work is that it is done one image at a time.

Regards,
Neil
















Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 21346
    • View Profile
    • Camera Bits, Inc.
Re: Duplicate Files - Warning vs Rename
« Reply #12 on: October 06, 2007, 07:16:07 AM »
Neil,

Trying to figure out how to have PM give me a warning - when I'm copying a file from one folder to another - that there is already a file in the new folder that has the same name. The only thing I can find is an option to tell PM how to rename it. Windows does this, ACDSee Photo does this. Surely I'm missing something.

No, we rename the source file when it collides with a file at the destination.  May I ask why are you copying the same files over and over to the same location?

-Kirk


I would like to add my 2 cents as to why I want to do this... my folder structure looks like this:

d:\Event
    NEF Raw
    Nef Best
    JPG Full
    JPG Web
    Print 4x6  (maybe)
    Print 8x10 (maybe, or some other output derived from JPG Full)

All my original NEFs are retained, untouched, in NEF Raw.  I cull out obvious flaws- OOF, etc.  I tag my best images for further work and copy to NEF Best.  I selectively edit these images with Capture NX.  I then do a JPG extract to JPG Full.  I add soft crops to JPG Full (for my web galleries).  I Save as... to JPG Web, applying watermarks and resize accordingly, etc.

All is well, but at this point I critically review JPG Web one last time.  I often see edits I missed, or maybe I don't like the crop when I see it without the crop rectangle.  Now back to Best NEF, where I re-edit with Capture.  Now I want to do an extract on that one image, to JPG Full, then do a Saveas... from JPG Full to JPG Web, and maybe the various print folders or other special output not listed above.

I have to delete the images from each of the cascading target galleries in order to eliminate dups.  My objective is, by default, to get one of each original image in each cascaded target gallery.  If I want two different crops or some other multiple versions, I will handle that with suffixes.  Your copy/rename logic just makes extra work for me by forcing me to delete the images I an imtending to replace.
A "replace" checkbox on the copy and saveas... dialogs would make life much, much easier for these re-edits.  I think it is a mistake to take one's personal workflow and come to conclusions such as "our way is to always rename rather than replace...".  This issue, in conjunction with the issue I just posted to Feature requests, where your Explorer start at folder is inconsistent or, in the case of Extract, simply always starts at My Computer, makes this re-edit workflow very cumbersome, especially since the nature of this work is that it is done one image at a time.

We'll consider adding a "Replace duplicates" checkbox in the Copy and Save as dialogs.

-Kirk

Offline NeilR

  • Full Member
  • ***
  • Posts: 100
    • View Profile
Re: Duplicate Files - Warning vs Rename
« Reply #13 on: October 06, 2007, 08:14:03 AM »
Neil,

We'll consider adding a "Replace duplicates" checkbox in the Copy and Save as dialogs.

-Kirk

Don't forget that step-sister-in-the attic operation - Extract JPG from Raw  ;D

Thanks, Kirk!  The involvement of yourself and by extension the other developers here is awesome!

Neil

Offline mbbphoto

  • Sr. Member
  • ****
  • Posts: 306
    • View Profile
Re: Duplicate Files - Warning vs Rename
« Reply #14 on: October 11, 2007, 06:48:09 AM »


We'll consider adding a "Replace duplicates" checkbox in the Copy and Save as dialogs.

-Kirk


Awesome!
A warning option would also be nice....
(My fears are when we have a newbie downloading....)
Marc
Marc