Enclose all the sub folders in List View

Hi,

Can you please guide me the script to enclose all the sub folders in List View if I open Main_folder.

Input:

Main_folder
Sub_folder1
Sub_folder2
Sub_Sub_folder1
Sub_folder3

Expected output:

Main_Folder

All the sub folders and sub_sub folders should be enclosed if I option Main_folder in List view.

Thanks
Asuvath

I don’t understand what you mean by “enclose”.
Are you asking about clicking disclosure triangles in Finder list views?