Finding Lower and Upper case in fields using filter expressions

I know that regular expressions can do the conversion. I use them all the time. So my problem is, I use caps for all fields and when I use the rename and there is a duplicate, it doesn't create the file because its a dupe and it remains lower case.

How do I use the filter expression [F3] to filter out all tags/fields that are still lower case so I can delete the duplicate?

I've tried:

%artist% IS lowercase

%artist% IS "lower case"

%artist% HAS lowercase

Nothing seems to work and I can't find anything in the support threads for filter/expression that seem to do what I'm looking for.

Thoughts??.....

Thanks!

This filter finds artists with only small letters:
"$ifgreater($strstr(%artist%,$lower(%artist%)),0,yes,no)" IS yes

thanks dano!

The only thing is that it still returns groups like 702, 112, 50 cent.....but it looks like it will do what I need......

:slight_smile:

This filter finds ARTIST content, which is build completely from lowercase letters, finds also complete empty ARTIST and finds combinations of digits and lowercase letters:
"$if($eql($replace(%ARTIST%,$lower(%ARTIST%),),),1,0)" IS 1

DD.20101028.0450.CEST

I'm going to change the scope, is it possible to do the same type of search in the actual file name itself to test if it is in lower case or upper?

I've tried to replace %ARTIST% with %_filename% and that just killed everything.

The corrected files for the scripts I used put all tags and filename into uppercase.

All my imported files are all lower case, I would just like to search for those if possible and the imports tags are sometimes blank or non existent. This helps when doubles are present and not renamed during the tag to file name routine.

Thanks for your time and effort.

Chris

This filter string works for me too (shows all the filenames containing letters that are considered lowercase letters):
"$if($eql($replace(%_FILENAME%,$lower(%_FILENAME%),),),1,0)" IS 1

DD.20101029.0340.CEST

Still having problems with this, here is the condition:


In order to bind an uploaded picture everlasting to the forum message, please use the attachment feature of this forum.

kittmaster, your screenshots show that the filter string does what it has been designed for, no failure in result.

Consider that nearly all work in Mp3tag runs more clear and fluently when working with "isolated data", that means one data entity stored into one tag-field. If the tag-fields are properly filled, then all other formatting, exporting, displaying and so on is generally the same job.

If you have complicated structured filenames, then split the components into separate tag-fields and work from the other point of view with the data. Assembling a structured filename from tag-field content is rather the last one step in the whole process.

If you have a structured filename, form where you need to import data into tag-fields, then start the process by using the converter "Filename - Tag" to get filename components into tag-fields. It is much more easier to handle a single data component than a complete data structure.

Please try to rephrase your problem.

DD.20101029.0945.CEST

Ah, I see why the filter is working correctly since the first letter is an UPPER it is considered valid.

OK, how about, ANY letter in filename that is LOWER is returned since my scripts capitolize all tags and then tag to filename is issued making all filenames UPPER.

So dupes not tagged due to duplication are either mixed or lower.

I want to find all lower to remove known duplicate.

Doing this task folder by folder will be difficult, files approaching 31K titles, hence why I'm looking for a helpful filter to drill down the data.

Thanks for your help thus far.

Let me try to understand the problem by a simple example with two files.

File 1: "File1.mp3", having one tag-field ARTIST, value "ARTIST UNKNOWN".
File 2: "File2.mp3", having one tag-field ARTIST, value "Artist Unknown".

While trying to change the filenames using converter "Tag - Filename" with Formatstring "%ARTIST%", the file system will throw a naming error, because of the duplicate file name, because the file system can store mixed case names, but does not differ between lower case and upper case.

So you are searching for some functionality to detect such files, which have the tag-field ARTIST written in any variation of lower case or upper case letters, but with basically the same text content regardless of letter case.

In general you can detect and visualize those duplicate tag-field entries simply by sorting the tag-field column. Duplicate entries will be ordered together, guided by the collation sequence.

In order to avoid file system errors when renaming files, it is best practice to assemble the new filename in a helper tag-field (I repeat myself for years here in the forum), and check this tag-field content for possible upcoming errors, before writing the new file name to the disk directory.

My recommendation:
First assemble the new filename into a user defined tag-field e. g. "MY_FN".
Do this with all files of your file collection.
Then sort the collection by this tag-field.
Files with the same content will be obviously arranged together in the file list.
Then do what you want, e. g. change the content in the original tag-fields and such things.

If you want to see only the "duplicate" files in an ordered list output, then you can adapt the following proposal to your needs. I have just published a "Duplicate Detect Method", see there:
Wie vorgehen um doppelte per %_md5audio% finden

DD.20101029.1642.CEST

I admit, for the Mp3tag novice user the newly introduced "Duplicate Detect Method" looks complicated, but this is only founded in the usability of Mp3tag system variables %_crc%, %_md5%, %_md5audio%. Mp3tag calculates these values only when exporting into text file, so the values need to be re-imported for the further step of comparison.
For your task the export and import of values is not necessary.
The described process for duplicate detection can be reduced to minimum effort.

For example:
We have a bunch of files and want to examine their tag-field ARTIST for similar values, better to say, we want to check the tag-fields for the same value, which differs only by letter case.

This can be done by the following export script.

$filename(O:\TEST\Export.Same.Artist.txt,UTF-8)$repeat('=',90)
'List of files with the same value (ignoring case) in tag-field: ARTIST'
$repeat('=',90)
$loop($lower(%artist%))$loop($lower(%artist%))$loopend()$ifgreater(%_max_counter%,1,$char(13)$char(10)$loop(%artist%)%artist%'|'%_path%$char(13)$char(10)$loopend(),)$loopend()
$repeat('=',90)
'Totals - Searched Files: '%_total_files%' - Original File Size: '%_total_size%' - Playing Time: '%_total_time%
%_datetime%' script generated by '%_app%' - <a href="http://www.mp3tag.de" target="_blank">http://www.mp3tag.de</a> -'
$repeat('=',90)

The script can be adapted to any other tag-field. To use it with the user defined tag-field "MY_FN" all occurrences of "%artist%" must be replaced by "%MY_FN%".

DD.20101030.0735.CEST

I got sidetracked and forgot to respond to this, I will give your method a try, thanks for that detailed information, I will give it a go as soon as I get a chance......:slight_smile:

All the best,

Chris