Journal name batch conversion

I’m looking to figure out how to do the same thing in both cases, any help would be incredibly appreciated. Thanks.