Bug: tag File Line replaces colon with dash!
#1 : 04/07-25 19:43 Chris
Posts: 38
|
Apply the script:
return app.parseTags( '<File Line:1>' ) == ":"; on a file "colon.TXT" containing just a colon character. (User Guide says: <File Line:x> Will insert a line of text from the file. The parameter x is the line number, starting from 1. Note, do not use on binary files.) Expected: New Filename true.TXT Observed: New Filename false.TXT A fix would be much appreciated! But given this would break compatibility with existing scripts, it needs to be on a settings checkbox. Also note a bug with this forum. <File Line:1> in title of this post gets silently removed. UPDATE: On Windows 7, AR 4.13.00p, this affects: "\*/:<>?! And the replacement comes from this setting https://i.imgur.com/oabsj5V.png (despite its documentation in Help). |
#2 : 04/07-25 23:27 Delta Foxtrot
Posts: 521
|
Reply to #1:
Maybe check your "Options / Settings / Renaming / Replace unsupported with:" setting. It might have a dash in the field. EDIT: This forum is not state of the art, but it [mostly] gets the job done. For instance, don't use the letter i as a counter var against an array in scripts you post... square brackets plus i = [i] italics! and no brackets! :) Best, DF |
#3 : 05/07-25 12:50 Chris
Posts: 38
|
Reply to #2:
It does have a dash in the field. But it is not operating in this case https://i.imgur.com/HkF0m8X.png as expected from the fact this "Replace unsupported with" (oddly) is for only Audio Tags (says the User Guide). > don't use the letter i as a counter var against an array in scripts you post... square brackets plus i = italics! and no brackets! : Thanks! PS Re the fail with Replace '-' https://i.imgur.com/d9pVVQl.png , I see that Replace IS operating here https://i.imgur.com/Uxc9g1U.png so we have a bug and that's what's causing my fail. This https://i.imgur.com/HFU6QIR.png confirms the bug is in the tag not parseTags. |
#4 : 05/07-25 20:44 Kim Jensen
Administrator
Posts: 1002 |
Reply to #1:
What is the actual case? Why do you have a file with just a colon in it? Note, the <File Line> tag was never meant to be used with scripting. You might experience unexpected behavior. Any character value not supported on your OS, like : < and >, will be replaced by the replace character in the settings window. That applies to any tags. |
#5 : 06/07-25 18:48 Chris
Posts: 38
|
Reply to #4:
> What is the actual case? Why do you have a file with just a colon in it? The test file has just a colon in it. But the issue occurs with any real-world files containing colon. > Note, the <File Line> tag was never meant to be used with scripting. You might experience unexpected behavior. Note that doesn't accord with the User Guide. If <File line> should not be used in scripting, perhaps state this restriction in: app.parseTags(tags): string Parses the specified string for tags and returns the result. > Any character value not supported on your OS, like : < and >, will be replaced by the replace character in the settings window. That applies to any tags. Again that does not accord with the User Guide which says this replacement is only for Audio tags. I cannot see an advantage and see considerable disadvantage in this replacement being made in tags, rather than in the filename itself. |
#6 : 06/07-25 20:00 Kim Jensen
Administrator
Posts: 1002 |
Reply to #5:
In previous versions, the replacement was only done for audio tags. In later versions, this procedure was extended to apply to any tag values. I might have missed to update the documentation. You can probably find other discrepancies or missing details. Keeping the documentation in-sync with the logic of the software, can be a very difficult task at times. FYI: The next version will have native support for extracting metadata values, including the date (converted to iso format), from .eml files. You might not need the <File Line> tag for long. |
#7 : 06/07-25 23:17 Chris
Posts: 38
|
Reply to #6:
> FYI: The next version will have native support for extracting metadata values, including the date (converted to iso format), from .eml files. You might not need the <File Line> tag for long. Good to hear. Thanks! Please do preserve the zone. |