Executing shell commands flickers a console

These functions call straight to C and whatever happens is outside of our control. As an example, os.execute() will call system():

       The system() library function behaves as if it used fork(2) to
       create a child process that executed the shell command specified
       in command using execl(3) as follows:

           execl("/bin/sh", "sh", "-c", command, (char *) NULL);

I would recommend that you use the functions of LuaFileSystem to get the files in a folder:

3 Likes