It isn`t CASTLE IN THE DESERT. LOST IN A HAREM is an MGM comedy. The one that I was thinking of was THE ANDY GRIFFITH SHOW haunted house episode. 15 years past your cutoff.