Create expand folder function