Renaming


#25
  1. How can I change (replace) all the non English (Cyrillic, Latvian, German etc) folder's and all sub-folder's (directories and subdirectories) letters?
    D:\Uplade\New Folder_1\Eduards Rozenštrauhs\Eduarda Rozenštrauha Dziesmas\00 - Eduards Rozenštrauhs - Vecās Likteņ Dzirnas - (Eduarda Rozenštrauha Dziesmas _ CD) - .flac
    with
    D:\Uplade\New Folder_1\Eduards Rozenstrauhs\Eduarda Rozenstrauha Dziesmas\00 - Eduards Rozenštrauhs - Vecās Likteņ Dzirnas - (Eduarda Rozenštrauha Dziesmas _ CD) - .flac

These tags are of course remain unchanged:
Artist is Rozenštrauhs
Title is Vecās Likteņ Dzirnas
Album is Eduarda Rozenštrauha Dziesmas

  1. How can I change the uppercase letters to uppercase letters, lowercase letters in lowercase letters to the one single effort? Without writing all uppercase letters and all lowercase letters.
    [?] case-sensitive comparison

Following the example of:
[#16]
T=2
F=_DIRECTORY
1=\u0160
2=S
3=0|1

[#17]
T=2
F=_DIRECTORY
1=\u0161
2=s
3=0|1

LV__Lat_directory.mta (1.07 KB)

Cyrillic_to_Latin_FILENAME.mta (3.02 KB)


#26

How can I change (replace, rename) the folder and all its sub folders names with mp3Tag program?
See details above.


#27

Something I found:

  1. Convert / Tag > Filename / %track%. %artist% - %title% - (%album% _ %discnumber%) - %year%
"D:\...\19. R-re, mi-mi, fa-ā.flac" -> "D:\...\19. Sīpoli - R-re, mi-mi, fa-ā - (Agrāk Un Tagad _ CD 3) - 2011.flac"
2) Action / LV Lat Tag /
Replace "_TAG": "ā" -> "a"
                              Replace "_TAG": "ī" -> "i" , etc.</blockquote>
artist: Sīpoli -> Sipoli title: R-re, mi-mi, fa-ā -> R-re, mi-mi, fa-a album: Agrāk Un Tagad -> Agrak Un Tagad
3) Action / Format value "_FILENAME": D:\...\$if($eql(%compilation%,1),Compilation,%artist%)\[%year% - ]%album%[\\%discnumber%]\\%_filename%
"D:\...\19. Sīpoli - R-re, mi-mi, fa-ā - (Agrāk Un Tagad _ CD 3) - 2011.flac" -> "D:\...\Sipoli\2011 - Agrak Un Tagad\CD 3\19. Sīpoli - R-re, mi-mi, fa-ā - (Agrāk Un Tagad _ CD 3) - 2011.flac"
4) Convert / Filename > Tag / %track%. %artist% - %title% - (%album% _ %discnumber%) - %year%
"D:\...\19. Sīpoli - R-re, mi-mi, fa-ā - (Agrāk Un Tagad _ CD 3) - 2011.flac" -> track: 19 artist: Sīpoli title: R-re, mi-mi, fa-ā album: Agrāk Un Tagad discnumber: CD 3 year: 2011
5) Action / LV Lat Filename /
Replace "_FILENAME": "ā" -> "a"
                                     Replace "_FILENAME": "ī" -> "i" , etc.</blockquote>

"D:...\19. Sīpoli - R-re, mi-mi, fa-ā - (Agrāk Un Tagad _ CD 3) - 2011.flac" ->
"D:...\19. Sipoli - R-re, mi-mi, fa-a - (Agrak Un Tagad _ CD 3) - 2011.flac" ->

So we get all the directories, sub directories and file names in Latin (Roman) characters, but leave (unchange) the tags with Latvian (Russian, German, etc.) specific characters.

Do not be a shorter way to do this? As can be immediately adjusted to fit the mask directory and sub ​​directory names?

"D:\...\Sīpoli\2011 - Agrāk Un Tagad\" -> "D:\...\Sipoli\2011 - Agrak Un Tagad\"
... say the introduction replace "_SUBDIRECTORIES"!

PS: at the beginning of the tags with specific letters.


#28

This may help ...

Unicode to ASCII
/t/7279/1

Proposal for a workflow in german.
Web-valide Dateinamen aus Tags erzeugen

Change Bartók Béla to Bartok Bela (loose the special chars)
/t/9129/1

tihS can happen
[X] Regexp error

DD.20140110.0914.CET


#29

Thank you for your explanation, but this is not exactly what I wanted to know. Actually, I have developed my own approach and I am aware of how to change specific characters (for non English language letters) - so there is no problem in regards of this, but methods of the Mp3Tag program are not useful to change folder (_DIRECTORY) and relevant subfolder names by one take.

There is a simplified example:

My start filename is "Aaa - Bbb _ Aaa Ccc.flac",
artist name: "Aaa", title: "Bbb", album: "Aaa Ccc".

If I use the mask: "D:\Music\%artist%\%album%\%artist% - %title% _ %album%" - the address generated by program Mp3Tag is "D:\Music\Aaa\Aaa Ccc", that means: the result is
"D:\Music\Aaa\Aaa Ccc\Aaa - Bbb _ Aaa Ccc.flac"
("Action > Format value "_FILENAME": D:\Music\%artist%\%album%\%artist% - %title% _ %album%")

If I have mistaken and initially have written incorrect word (Aaa instead of Hhh) and try to use Action > Replace "_DIRECTORY": "Aaa" -> "Hhh":
From the path:
"D:\Music<b>Aaa<b>Aaa Ccc\Aaa - Bbb _ Aaa Ccc.flac"
I have got the result:
"D:\Music<b>Aaa<b>Hhh Ccc\Aaa - Bbb _ Aaa Ccc.flac" - that means - only the last folder name is changes, but I need full path folder names to be changed as
"D:\Music<b>Hhh<b>Hhh Ccc\Aaa - Bbb _ Aaa Ccc.flac"

If there is path like
"D:\Music<b>Aaa<b>Aaa Ccc<b>CD 3\Aaa - Bbb _ Aaa Ccc.flac", by making changes, I get the same
"D:\Music<b>Aaa<b>Aaa Ccc<b>CD 3\Aaa - Bbb _ Aaa Ccc.flac"!!


What I need is the solution of how to change (create a new) file folder and sub folders names by one take, using Action > Format_value "_FILENAME" - the main objective what I need to get is to replace non English language characters (initially taken from file Tags) in file folder and sub folders names (I need file and folder names without non English language characters) by one take. Leaving without changing tags - with non English language characters!

Or if necessary, by providing prior notification of folders which name should be changed.


#30

'i_edgars', I will try to answer, and I want to say something about the problems, which you have stumbled into.

  1. Do learn something more about the construction of path names;
    do understand the difference between absolute and relative path names and how they will be contructed; especially do understand to build a relative path name.

Maybe this can help to understand ... http://en.wikipedia.org/wiki/Path_(computing)

For example ... %_directory%'.....' ... points to the folder two steps above from view point of the folder, which is the current directory folder of the current file.

  1. It has been turned out in practice, that also the changes for the file system, that means moving or renaming of files and folders, should be prepared in temporary tag-fields.
    Doing so there is the benefit of preview, how the change of a folder name or a newly assembled filename would be look like.
    Duplicates and other quirks can be easily detected this way, visually in the list view, or by filtering, before getting into trouble while executing time.
    Doing so I have no problems since years with bad file names or unexpected moved folders anywhere.
    The rule is: Try it virtual, then do it real.

Oh oh oh ... I am preaching this for many years ... ... ...
You can prepare all names for files and folders in one or more helper tag-fields.
Thus you have full control over the resulting strings without running into disaster on your hard disk.

See also ... (not the best links, there might be better examples in the forum anywhere)
Help with ML reorganization
Lücke vor und hinter eine Zahl setzen
mit _DIRECTORY Überordner umbenennen (zb bei 2xCD)
Help to create a parameter to rename folders
unterschiedlicher Aufbau von Dateinamen
Easy way to get directory names above Parent?
Convert tags to filenames questions

DD.20140111.2230.CET


#31

_DIRECTORY refers to the immediate hierarchie above the filename.
if you replace only in _DIRECTORY the you touch only
Aaa Ccc\Aaa - Bbb _ Aaa Ccc.flac
but leave out the
D:\Music\Aaa\

If you want to treat the whole path then you would have to use the whole _PATH and not only _DIRECTORY.
So if you create an action to replace certain characters you have to do a two-step:
first replace in _path
second replace in _filename


#32

-1-
"first replace in _path" - How to do it?
I can not get it! See attachment.
I set up a new "Action" Replace with "_PATH": "Aaa" -> "Hhh", but the use of this Action does not change anything anywhere!
"D:\Music\Aaa\Aaa Ccc\Aaa - Bbb _ Aaa Ccc.flac" ->
"D:\Music\Aaa\Aaa Ccc\Aaa - Bbb _ Aaa Ccc.flac" !!



#33

Oh, I just noticed: you cannot modify path directly.
But:
you can create an action group that does the following
Format value for tmp_path (user defined field)
Format string: $replace(%_path%,Hhh,Aaa)
Format value for _DIRECTORY
Format string: %tmp_path% <- this sets the new directory as it holds the full path name.
Delete field tmp_path

Edit: I am a little clumsy today:
You can shorten the whole stuff to just one "Format value" action if you join step 1 and two:
format value _DIRECTORY
Format string: $replace(%_path%,Hhh,Aaa)


#34

Hmm ... for this case using the "function $replace" resp. the "Action Replace" on the pseudo tag-field _DIRECTORY, which is the directory resp. the home folder of the current file, this manipulation indeed will work, ... and will rename the current home folder of the current file, ... and will also applied in one go to all other files in this folder too.

If you want to edit other parts of the folder path, then you have to use something like this ... try to format ...
Field: _DIRECTORY
Formatstring: %_directory%'......<!--colorc-->'%ARTIST%'<!--colorc-->'%ALBUM%
... or ...
Formatstring: 'D:\Music<!--colorc-->'%ARTIST%'<!--colorc-->'%ALBUM%

DD.20140112.1229.CET


#35
  • 1 -

"Action> Format value"_FILENAME": $replace(%_path%,Aaa,Hhh)!
That is what I needed! Thank you very much!
This Action is working perfectly (attachment 1)
(.... format value _DIRECTORY ... not propertly - attachment 2)
"D:\Music\Aaa\Aaa Ccc\Aaa - Bbb _ Aaa Ccc.flac" ->
"D:\Music\Hhh\Hhh Ccc\Hhh - Bbb _ Hhh Ccc.flac"
Very well, the tags remain unchanged - that I also needed.

That was just the beginning of my entire music library to rename!

  • 2 -
    Is it possible for two things:
  1. "Action> Format value"_FILENAME"and
  2. "Action> Unicode to ASCII" (/t/7279/1
    connect a single operation?
    This means "Action> Format value"_FILENAME": $replace(%LV Lat filename.mta%) ....?"
    or "Action> Format value"_FILENAME": $regexp(%UNI_TO_ASC%) ....?"

Is it possible?

LV__Lat_filename.mta (1.05 KB)



#36



#37

Regarding the action group "Unicode to ASCII" ...
to make the whole thing run smoothly, I suggest the following steps.

  1. For example, there is a tag-field TF, which content should be ascii-fied.

  2. Create/format a new tag-field UNI_TO_ASC with %TF%.

  3. Then run the action group UniToAsc.Diacritics or such.

    These actions expect the tag-field UNI_TO_ASC.
    Then you should receive the ascii-fied result in the tag-field UNI_TO_ASC.

  4. Format the tag-field TF with %UNI_TO_ASC%.

  5. Remove the tag field UNI_TO_ASC.

All steps can be split into three action groups.

  1. Action Group for processing other things and preparing for step 2 from above.
  2. Call Action Group UniToAsc.Diacritics
  3. Action Group for follow-up.

If everything works, then you can put the three action groups in the dialog "Actiongroups/Utils" into a meta-group.

DD.20140112.1415.CET


#38

If I look at the collection of actions to replace, I think it may be easier to maintain (and copy) if you used the $replace-function.
The advantage of this function is that you can build up a more or less unlimited chain of replace pairs - and as the fieldname is mentioned at the beginning, you don't have to retype that name for each pair:

$replace(%_filename%,Hhh,Aaa,\u010d,c,\u0123,g,.......) -> append this listing with the replace-pair from your mta-example.


#39

Something is wrong in this script, as folder and file names are changed only the first typed letter!



#40

I think that if you enter the constants like Ä,A then you shouldn't add the prefix \ as this is only used to indicate that a following code number.

So Ä,A is correct, \Ä,A is not as this would search for the backslash plus the diacritical character - which does not score a hit.


#41

By typing in the "Format string" "Ä,A," or "\u010d,c," or "u010d,c," ... files and folders are changed only the first typed letter!
But typing into *. mta file "Ä,A," ... are changed letters to all! Besides respecting uppercase and lowercase letters. See attachment.
Why is that??
Attach the file to your Aaa.mta with some Latvian letters - what you see in there (on a computer without Latvian encoding)?


Aaa.mta (75 Bytes)


#42

Attached is an excerpt from one MTA file out of my still growing arsenal of Mp3tag related stuff.
I use this MTA script since more than seven years unchanged.
I wrote this MTA file while I was learning to understand the Mp3tag toolset, to solve my tagging tasks.
There are some things in there which I would code in another way nowadays, but as it works still today ... never change a running system, you know.
For you it might be of interest how I did the replacement of special characters to ASCII characters.

20140114.ExcerptFromMyMp3tagWorkbench.mta.txt (1.91 KB)
For usage remove the extension ".txt".

DD.20140112.1816.CET

20140114.ExcerptFromMyMp3tagWorkbench.mta.txt (1.91 KB)


#43

I faced difficulties in renaming the Cyrillic letters. Action renamed only about 45% of the characters!
_FILENAME $Replace(%_path%,Ru,En,) See attachment.
On the _path
D:\Music\АБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ\05. АБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ.flac
during operation Aaa (Ru) path.mta I get (->)
D:\Music<u>ABVGDEJoZhZIJKLMNOПРСТУФХЦЧШЩЪЫЬЭЮЯ\05. ABVGDEJoZhZIJKLMNOПРСТУФХЦЧШЩЪЫЬЭЮЯ.flac!
What is it? Format string entry is too long? Change only 16 x 2 (32) letters!
What am I doing wrong or what should I do?
With the same method of renaming the _path of Latvian letters to English letters or letters from German to English letters action _FILENAME $replace(%_path%,Lv,En,De,En) is working!

!!All tags have to keep all of the Latvian language, German, Russian and other languages ​​letters!!

And more ... To be able to change back to English letters to Russian characters should be able to use
Ъ -> # # ъ -> #, or ''
Ь -> '' ь -> ', or '
http://en.wikipedia.org/wiki/Romanization_of_Russian
ISO/R9: 1968 + GOST 1971 (2)

What does "ARTIST_" what is the difference between "ARTIST" your attached *. mta file?

Aaa__Ru__path.mta (399 Bytes)

Aaa__De__path.mta (93 Bytes)



#44

While you are designing a proper translation replace function you should not use the pseudo tag-field _FILENAME as the target of your experiments. Do use a temporary tag-field!
Names in the file system have additional conventions, which may 'overlap' or 'alienate' the result of the $replace function.

One more note about clarity of scripting:
Do avoid such very long tapeworms of parameters.
Do use several smaller distinguished $replace function calls.

The tag-field "ARTIST_" is just a temporary tag-field to hold intermediate results, beside the original value in the original tag-field "ARTIST".

When all tag work has done, such self-defined temporary tag-fields will be deleted.
In the Mp3tag list view I have created some columns to display the content from the temporary tag-fields, for example TITLE_, ARTIST_, ALBUM_, FILENAME_, so there is a good overview of what is going on, without to ravage existing content.

When all tag work has done, I disable manually the helper columns or I activate one of my stored column configuation files via the "Utils" dialog in the column configuration dialog.

DD.20140116.2157.CET