Renamer

Started by P.Jones, September 14, 2014, 09:23:59 PM

Previous topic - Next topic

P.Jones

Whilst using the Renamer tonight I took the original File name and just wanted to remove the first 4 characters.

Maybe a stupid question but why does the Renamer go through the motions of Preparing Move/Copy and Resolving Duplicate File Names when I haven't selected these options.

Mario

I'm not sure that I understand. Please define 'motions'.
The Renamer will, for example, always check for duplicate file names. It has to, because the steps you run may produce duplicate file names...
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

P.Jones

Quote from: Mario on September 15, 2014, 07:35:54 AM
I'm not sure that I understand. Please define 'motions'.
The Renamer will, for example, always check for duplicate file names. It has to, because the steps you run may produce duplicate file names...

Hi Mario

I have a file named abc_140915_1234.jpg

I wish to remove abc_

Using the Renamer I have

Original Filename
Remove text = abc_

I haven't selected

Copy
Move
Unique Number

as Processing Instructions, so why when I run the Renamer does it go through the motions of Preparing Move/Copy and Resolving Duplicate File Names as if I did have them selected.

If you only select a few files you don't notice. But if you select a large amount as I did with 3000 files you do.

[attachment deleted by admin]

lenmerkel

What if the first four characters you're removing are a part of the filename that makes it unique? Wouldn't you want IMatch to check that your rename deosn't result in duplicate file names? Based on your knowledge of your file names, you might know that won't happen, but IMatch can't know unless it checks. Or am I missing something?
Over the hill, and enjoying the glide.

Mario

Checking for duplicate file names is of course required.
I think the only 'problem' here is that the renamer always shows the "Preparing Move/Copy" message while it checks for Move/Copy steps. So the message is shown even of there is no move or copy step active. I did not bother to add a special logic to suppress this dialog (and the percentage bar) so if you rename thousands of files, it may be visible for short time. Since this is no bug report, I'll make a note somewhere and look into this for one of the next releases.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

P.Jones

Quote from: lenmerkel on September 15, 2014, 06:13:18 PM
What if the first four characters you're removing are a part of the filename that makes it unique? Wouldn't you want IMatch to check that your rename deosn't result in duplicate file names? Based on your knowledge of your file names, you might know that won't happen, but IMatch can't know unless it checks. Or am I missing something?

As I know all of the file names are different theres no need to check for duplicate names,  thats why I haven't selected it in the Processing Instructions.

As far as I understand with the Renamer it should only check for things if asked too.

P.Jones

#6
Quote from: Mario on September 15, 2014, 06:48:13 PM
Checking for duplicate file names is of course required.
I think the only 'problem' here is that the renamer always shows the "Preparing Move/Copy" message while it checks for Move/Copy steps. So the message is shown even of there is no move or copy step active. I did not bother to add a special logic to suppress this dialog (and the percentage bar) so if you rename thousands of files, it may be visible for short time. Since this is no bug report, I'll make a note somewhere and look into this for one of the next releases.

Hi Mario I posted a reply just  after your post was made so didn't read it first.




lenmerkel

Quote from: P.Jones on September 15, 2014, 06:50:29 PM
As I know all of the file names are different theres no need to check for duplicate names,  thats why I haven't selected it in the Processing Instructions.

As far as I understand with the Renamer it should only check for things if asked too.

Ah, now I see. I think you're combining the 'Unique Number' rule with the need for IMatch to check for duplicates. They are different things. You don't select whether or not IMatch checks for duplicate names - it needs to check every time. The 'Unique Number' rule isn't a flag to tell IMatch whether or not to check for duplicates. It's a way of telling IMatch to add a unique number to the filename to avoide duplicates that result from your renaming. It has to check for duplicates every time because it has no 'inside knowledge' that your rename won't result in duplicate filenames in any given folder. For example, what if renaming a file would cause a conflict with another file in the same folder that isn't in your list of selected files to rename?
Over the hill, and enjoying the glide.

P.Jones

Quote from: lenmerkel on September 15, 2014, 07:13:00 PM
Quote from: P.Jones on September 15, 2014, 06:50:29 PM
As I know all of the file names are different theres no need to check for duplicate names,  thats why I haven't selected it in the Processing Instructions.

As far as I understand with the Renamer it should only check for things if asked too.

Ah, now I see. I think you're combining the 'Unique Number' rule with the need for IMatch to check for duplicates. They are different things. You don't select whether or not IMatch checks for duplicate names - it needs to check every time. The 'Unique Number' rule isn't a flag to tell IMatch whether or not to check for duplicates. It's a way of telling IMatch to add a unique number to the filename to avoide duplicates that result from your renaming. It has to check for duplicates every time because it has no 'inside knowledge' that your rename won't result in duplicate filenames in any given folder. For example, what if renaming a file would cause a conflict with another file in the same folder that isn't in your list of selected files to rename?

Yes thats what I was doing.

Regarding the other, Copy/Move, Mario has it added to his very long To Do List.

Cheers