I am trying to use automator to rename files based on the folder I select as the input. I want to take the folder name and if 1 of 4 phrases are found in the folder name, 1 of 4 variables would be used. I don't know applescript but I feel this is the way to go base on other languages I know.
Can anyone convert the following concept?
if file name contains "USA" then
var = "US"
elseif file name contains "CAN_FR" then
var = "CAFR"
elseif file name contains "CAN_EN" then
var = "CAEN"
end
Much appreciation to anyone that can help.