add function to insert all the files in the directory tree