Pulling location from directory into an action


ok i know i've been told how to do this but everything i have try isn't working. i like to have the country added into the tag but don't the correct action format to get this done. my action is

format value
field _directory
string %dummy% - %Country% i know country is a field value. so what is the correct action to set this up please? i have this on and old pc but now trying setup on a new one, Thank You

It is not clear to me what you want to do.
If you want to add the country to the existing folder name, then there is an action example in the FAQs:

Please note that %dummy% does not work in actions of the type "Format value" or in a way it does but it always returns an empty string.

If you want to get the field COUNTRY filled with data from the folder name, then the type of action is not correct but you have to use "Guess value".

Also see here:

And where should be the content with a country name in your example screenshot?
I only see E:\-\ for your Harry Styles song.

So from where exactly do you want to pull the COUNTRY from?
You can only pull content that exists.

If your path or directory would contain something like
e:\USA\Harry Styles\01 - First track.mp3
you could pull USA as country from it. But in your example there is nothing like a country.

Please show us a real example screenshot from your collection.

so sorry i left it out i like it to be inputed as tag filed Country USa or whatever inside the tag. like this
artist a-ha
country US
genre Pop
year 2024
it this make any sense to you all.

Try an action of the type "Format value" or Convert>Tag-Tag for _DIRECTORY
Format string: %_directory% - %country%

Perhaps an initial try-out with the Convert function is safer as that has a preview

try guess value and that work but how can i set it so that when i do other artist it will show up under whatever artist i'm working on. right now i have it set to alison krauss,

Why do you try "Guess value" when I just suggested "Format value"?
Is is that you want to rename the folder or get data from the folder name?

i like to get data from the folder, i also tried both
Try an action of the type "Format value" or Convert>Tag-Tag for _DIRECTORY
Format string: %_directory% - %country%
and neither will work so i'm not sure what i'm doing wrong.

Sorry, but your descriptions are very hard to understand.
To get data from the folder name try an action of the type "Guess value"
Source format: %_directory%
Guessing pattern: .....?
I don't know the guessing pattern as you have not shown an example for the folder name anywhere.

folder name E:\james taylor - us

I Got IT

guess value
surce %_directory%
string %dummy% %country%
Thanks for the help

If you want to get also hits for 2-word-countries try
Guessing pattern %dummy% - %country%

Your pattern may work for countries with just a single word. The guessing pattern uses the space character as separator and therefore "United Kingdom" would be taken as "Kingdom".
The hyphen is a better separator as it is apparently is unique in the folder name.