Set @path variable from name if name is in path names