Could you please show us a screenshot from the current situation and some of your folder names?
From where exactly do you want to read the date?
Is it already in the format YYYY-MM-DD as written in the topic title?
Or is it written as [YYYY.MM.DD] as written in your example text (assuming the first 05 is the month and the second 05 is the day).
Yes, the release date is written as shown in the picture. 2015-05-03
I want to recognize this and put it in front of the folder name like [2015.05.03].
Try an Action of the type "Format value" or use Convert>Tag-Tag for _DIRECTORY
Format string: '['$replace($regexp(%year%,(.*) .*,$1),-,.)']' - %_directory%
As field, you have to use _DIRECTORY as @ohrenkino told you, not TITLE.
You want to modify the folder name = _DIRECTORY, not the TITLE field inside your track.
You did not use the correct field: _DIRECTORY would be correct, not TITLE and you did not apply the whole suggestion but left out ]' which leads to the invalid syntax message
The result of an Action and the use of Convert is the same.
Convert has the advantage that you immediately see the expected result (without applying the format string).
As long as you see "Invalid syntax" as preview, you have an error in your Format String.
Please copy & paste the given Format string and check it carefully!
Format string: '['$replace($regexp(%year%,(.*) .*,$1),-,.)']' - %_directory%