The short answer is you cannot hide whole courses from specific groups of users as unless your site is locked down then anyone can simply go to yourmoodlesite/course/index.php and see the list of courses there. The key thing is that they should not see any other information other than the name of the course.
General help
Hide specific courses from a group of users
This discussion has been locked so you can no longer reply to it.