genearating yaml file from directory name