give array of folders as title note as path when creating directory tree