Thanks for your suggestion. However, I will only display the path in the treeview, not the file. But I still want to show the true number of files(paths) under the listed dir. I guess the rowCount won't work since the files won't be shown.