Simply put an empty index.html file to the folder. It will prevent the direct access to that folder.
Another way is that:
Put the following code into htaccess file
Options -Indexes
This will produce a 403 HTTP Status code on folder content listing.