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
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
"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
"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.
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.
'i_edgars', I will try to answer, and I want to say something about the problems, which you have stumbled into.
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.
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.
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.
_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
-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" !!
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)
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%
"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:
"Action> Format value"_FILENAME"and
"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%) ....?"
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.
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)?
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.
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?
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.