Renamer Don't rename file.. doesnt reflect changes in destination in real time

Started by Damit, March 21, 2025, 04:20:50 PM

Previous topic - Next topic

Damit

I want to report a possible issue, which really is not a glitch, but something that did confuse me while "previewing" different options while using the renamer. I thought something was not working because I was applying changes to the "Source file:" name in the dialogue box, and the changes were not being shown in the "Destination file:" box, as I expected. I later figured out that if you just go in and type a change in the "Source File" box, it seems that IMatch/Renamer will not recognize those changes and reflect any effect they may have in the destination file box.

For example if you are using the "Don't rename file when this variable returns true" function, and you want that variable to be "Mario", you cannot just go to the Source File Dialogue box and insert "Mario" into that file name if it was not there originally and expect the renamer to return that it is not renaming the file due to a filter, in real time. It seems that the file name used to see if the destination file changes must have the condition to preclude it from being renamed prior to selecting it for use with the renamer in order to test how the destination file will change.

I short, it seems that one cannot just change the value in the "Source File" dialogue box to see if the destination file changes in real time.

I originally thought that the "Do Not Replace..." function was not working with a open parenthesis, because when I inserted the open parenthesis in the Source file name, the changes did not occur. It was only when I exited out of the renamer function and changed the source name to include the open parenthesis, and then tried again, that things worked as expected.

If I am correct, and changes to the source file name are not used in real time to see how the destination will result, ala the VarToy, I would suggest, to avoid further confusion, that it may be a good idea to not allow one to edit the source file name in the Renamer Tool. Just a suggestion in case it helps, which I hope it does. :)

P.S. It would be great if topic titles could be allowed to be longer so I could phrase my topic more clearly. It would also serve future searches if more normal phrasing could be used instead of trying to truncate the title to fit the size restriction.

Mario

Works here just fine. When I add AAA to the source file name, the output file name (if it references the source file name) updates to show the AAA.

I'm sure that there is always one user who does super-complex stuff or strange stuff or unexpected stuff - and I don't care! Spending 80% more development time and money on a minor feature like this to cover each and every possible fringe case is not worth it.

Use the Preview button to see the actual results of your steps, especially when variables or other dynamic contents are involved.

QuoteP.S. It would be great if topic titles could be allowed to be longe
Feel free to reach out to the developers of the Simple Machines Forum software we use for this board.

Personally, I prefer short subjects and short posts. Because I have to read so many of them.

thrinn

Quote from: Damit on March 21, 2025, 04:20:50 PMf I am correct, and changes to the source file name are not used in real time to see how the destination will result, ala the VarToy, I would suggest, to avoid further confusion, that it may be a good idea to not allow one to edit the source file name in the Renamer Tool. Just a suggestion in case it helps, which I hope it does. :)
The help clearly states that the "Source file:" can be edited to "simulate" the preset behaviour. And generally, it works.
But if you use a variable like {File.Name} it still refers to the "real" name of the file, not to what you put into the "Source file" field. Else the variable evaluation would have to know that only in the Renamer use case there is some input field which now represents the name to work on.
Thorsten
Win 10 / 64, IMatch 2018, IMA

Damit

Maybe I was not making myself clear.  Maybe this will help:
https://imgur.com/a/OWFKd9j (not working as an image link for some reason)

As you can see it is not working here. I have the exact example demonstrated in this screenshot. The Destination file should read "Not renamed due to a filter." not "N:\Temp Import\Scanned Pictures\Epson FF-680W\1929-06-15c.ymdt-AB001-P-2.1x2.9@1500dpi-10000xl-0111-Mario Pepin El Dandy en New York000007true1.tif"

I just thought since you are always asking for people to report things like this, that you would want to know, especially since you are so diligent in make the help as good as it can be. Do with it what you will.

thrinn

Quote from: Damit on March 21, 2025, 04:20:50 PMI originally thought that the "Do Not Replace..." function was not working with a open parenthesis, because when I inserted the open parenthesis in the Source file name, the changes did not occur. It was only when I exited out of the renamer function and changed the source name to include the open parenthesis, and then tried again, that things worked as expected.
For your special use case, just select two files before calling the Renamer, one with, one without a parenthesis. Then, use the "Preview" to see the result.
2025-03-21 17_26_40-Renamer (2 files).jpg
Thorsten
Win 10 / 64, IMatch 2018, IMA

Damit

Quote from: thrinn on March 21, 2025, 05:08:26 PMThe help clearly states that the "Source file:" can be edited to "simulate" the preset behaviour. And generally, it works.
But if you use a variable like {File.Name} it still refers to the "real" name of the file, not to what you put into the "Source file" field. Else the variable evaluation would have to know that only in the Renamer use case there is some input field which now represents the name to work on.

Thank you Thorsten! 8) That is exactly why I was confused. You are right, the renamer is not working as explained in the help. I thought it would change when I edited the source file and when it did not, I posted a thread that I later deleted because when I added a "(" to the file name and made that the condition for a file not to be renamed, it would still rename the file. It was only because I stumbled on the solution by actually changing the file name prior to using the renamer (I had a hunch) that I discovered this incongruity. But you did a great job explaining why it did not work as I expected. I was just hoping to help prevent someone else to suffer the same confusion.

Quote from: thrinn on March 21, 2025, 05:27:18 PMFor your special use case, just select two files before calling the Renamer, one with, one without a parenthesis. Then, use the "Preview" to see the result.
Great Suggestion! Thank you so much for helping!! That is what I ended up doing.

Mario

QuoteYou are right, the renamer is not working as explained in the help
It does!
If you change the source file name, the output file name will update.

This is not guaranteed to work when you use a variable (!) in the source file name or output file name field.
It just does not parse variables there. I'm quite sure that the help does not mention that variables can be used in these fields? If it does, show me the help section which does and I will remove it to avoid confusion.

Use the "Preview" button to Preview results.


Damit

From: https://www.photools.com/help/imatch/ren_basics.htm?dl=hid-6

Source File: "...You can edit this name to try your Renamer preset against different input file names."

So I ask this: Can there not be variables in your preset? Yes. So where does it explicitly say you cannot use variables, or that this testing will not work with variables? If this is not stated, how will one know?

Now that I know what I know, I will use the preview, but it did cause confusion.

Mario

QuoteSo I ask this: Can there not be variables in your preset?
Variables are applied in steps to produce the output file name from the input file name.
There can be no variables in the source file name. The source file name comes from the database.

You can manipulate the source file name field to see how different file names affect the output file name that is produced by your steps. But no variables in the Source file name.

sinus

Maybe I do not fully understand. I thought, Damit wants use variables in the preset. You can see in the attachement one of my preset, used since ages.  8)
Best wishes from Switzerland! :-)
Markus

thrinn

Damit's concern is not about using variables as such. It is just that changes to the "Source file:" field (a possibility I wasn't even aware of) do not change the value of a variable like {File. Name}. So, if you use variables in your steps, you might have to use the Preview to see the resulting file names. It is not enough to look at the "Target file" field.
Thorsten
Win 10 / 64, IMatch 2018, IMA

Mario

This is not correct.

The Destination file value shown is created by applying all steps, including variables and all other options.

Image1.jpg

and when you manually edit the file name in the Source File input field, the changes are dynamically applied to the Destination file name:

Image2.jpg

But you cannot use variables in the Source file field or Destination file field. That's not supported nor useful.