You don't have to put the files into the pages/wiki folder, pages is the root namespace of the wiki, so you can put the files there.
It is possible to put the files into the pages folder, it is not necessary to do something else. I assume that your filenames don't meet the requirements; if this happens, DokuWiki is ignoring this files. Only the following chars are allowed:
lowercase letters
digits
-
_
.
Additionally, -, _ and . are not allowed at the beginning or the end of the filename. See
https://www.dokuwiki.org/pagename for further information.