Find all files (with any extension) in the current directory and up to three levels of subdirectories, excluding the projects and tasks directories, and sort them by the second field.
find . -maxdepth 3 -name '*.*' | grep -v -E '^\./(projects|tasks)' | sort -k 2