SetBaseName, GetBaseName script functions